Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

OS X file/folder invisibility to Finder? (like ~/Library/Caches/Firefox/Profiles)

Pardon my obvious ignorance…Wondering if someone would point me to more info on hidden files.


Was poking around the FireFox (24) cache and saw nothing via the OS 10.6 Finder window - but a heck of a lot via the terminal. (Not sure when these got hidden; as I recall they didn't used to be.)


As far as I can tell the "profilename.default" folder within ~/Library/Caches/Firefox/Profiles is invisible to the Finder. But the files inside it are not invisible if you command-shift-G to Go directly there.


In Terminal, ls sees that folder without the -a (as would be required for "." filenames); ls -lO displays the "hidden" flag for it (as "." files are also marked). As far as the contents of "profilename.default", no "hidden" flagged files besides .DS_Store).


Am curious how the "profilename.default" folder (which does not begin with a ".") within ~/Library/Caches/Firefox/Profiles is invisible to the Finder. Presume it's some metadata bit somewhere.


Can this easily/safely be toggled for any file/folder? If so, am curious how. Would appreciate being pointed to some info or commands to research, since my own search terms didn't seem to do it.


Thanks.

Mac OS X (10.6.8)

Posted on Jan 29, 2014 11:05 PM

Reply
Question marked as Best reply

Posted on Jan 30, 2014 5:24 AM

The User / Library folder has been hidden since Snow Leopard because too many novices were mucking up their machines.

Use the Finder "Go" menu while holding down the option key to expose the Library folder.

3 replies

Jan 30, 2014 7:56 AM in response to newtovid11

Am curious how the "profilename.default" folder (which does not begin with a ".") within ~/Library/Caches/Firefox/Profiles is invisible to the Finder. Presume it's some metadata bit somewhere.

Yes, let's explore!


ls -lOd Library/Caches/Firefox/Profiles/XXXXXXX.default
drwx------@ 7 mark  staff  hidden 306 Jan 30 09:06 /Users/mark/Library/Caches/Firefox/Profiles/XXXXXXX.default

OK, the hidden flag is set but where? Ah, the folder has extended attributes.


ls -ld@ !$
ls -ld@ Library/Caches/Firefox/Profiles/XXXXXXX.default
drwx------@ 7 mark  staff  306 Jan 30 09:34 /Users/mark/Library/Caches/Firefox/Profiles/XXXXXXX.default
    com.apple.FinderInfo     32 
    com.apple.quarantine     46

This doesn't tell you much. Let's explore the extended attributes.


xattr -l !$
xattr -l Library/Caches/Firefox/Profiles/XXXXXXX.default
com.apple.FinderInfo:
00000000  00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00  |........@.......|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |..................|
00000020
com.apple.quarantine: 0000;XXXXXXX;Firefox.app;|org.mozilla.firefox

It's not clear or documented well but the 40 in the com.apple.FinderInfo attribute means the folder is hidden. Let's dig deeper.


stat !$
stat Library/Caches/Firefox/Profiles/XXXXXXX.default
234881026 608254 drwx------ 7 mark staff 0 306 "Jan 30 09:13:16 2014" "Jan 30 10:03:15 2014" "Jan 30 10:03:15 2014" "Dec 19 15:49:01 2011" 4096 0 0x8000 Library/Caches/Firefox/Profiles/xXXXXXXX.default

Ok, the file flag is 0x8000

Let's look in /usr/include/sys/stat.h


cat /usr/include/sys/stat.h
.
.
#define UF_HIDDEN     0x00008000     /* hint that this item should not be */
                                             /* displayed in a GUI */
.
.

You can read the chflag manual which reveals or hides files and folder.

OS X file/folder invisibility to Finder? (like ~/Library/Caches/Firefox/Profiles)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.