Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On mac, I sometimes find a file called Icon^M . The one I have in front of me right now is empty.

Now, I can guess it's probably a file to contain... an icon, most probably the personalized icon for the folder, but why the wacky name with the control-M at the end ?

share|improve this question

migrated from stackoverflow.com Jan 15 '10 at 8:27

This question came from our site for professional and enthusiast programmers.

    
I saw closing votes to migrate to superuser... I am voting it as well. I do believe I posted the question in the wrong place. –  Stefano Borini Jan 15 '10 at 6:50
4  
It is empty because all the bits are in the resource fork. ls -l "$(printf 'Icon\r/..namedfork/rsrc')" –  Chris Johnsen Jan 15 '10 at 7:08
1  
The control-M at the end is to make sure that every time you're copying such a folder to a FAT32 drive you'll get a seemingly random error about a file you've never seen before. Actually, that's probably not the reason, but it is a side effect. –  Benjamin Dobson Jan 16 '10 at 0:51

2 Answers 2

You're right: According to haxx.se, this filename was the old (OS 9) way to have a personalized icon for a folder.

share|improve this answer
    
It seems like Google Drive creates this file now for me... :-( –  Ivanoats Jan 14 '13 at 18:22
    
Google Drive is not creating this file. Google Drive is incorrectly stripping the hidden-bit from an existing file causing it to become visible. –  MacLemon May 28 at 0:56

These Icon\r files are still in use on modern MacOS X today. They are generally invisible but sharing tools like Dropbox can cause them to become exposed as the hidden attribute assoicated with them may not be propagated with the file. More information about them can be read in the Icon? file on OS X desktop superuser question.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.