[TUT] Mac OS X: Selectively hide/unhide files and folders

Tutorials for Operating Systems, Applications etc can be posted here.
Post Reply
empireum
Donator
Posts: 3557
Joined: Sat Sep 30, 2006 5:00 pm

[TUT] Mac OS X: Selectively hide/unhide files and folders

Post by empireum »

By default, some files and folders are hidden on OS X, most notably, the Unix system folders at the startup volume's root. It is possible to have them shown using a third-party tool such as OnyX to make the Finder show all hidden files, but this will also reveal the .DS_Store files (which disturbs me, for example). Also, maybe you'll want to have only some files shown, not all. Or perhaps you want to hide a file or folder for some reason?


1) You need to have the Developer Tools installed. If you have, there'll be a folder called Developer on your startup drive's root.

2) Open Terminal and enter one of these two commands:

Code: Select all

sudo /Developer/Tools/SetFile -a v {file/folder}
(to make something visible) –or–

Code: Select all

sudo /Developer/Tools/SetFile -a V {file/folder}
(to make something invisible)

The command will require you to enter your password, apparently. Type the path to the folder/file or drag it in after typing a space, but don't type the {}, I've only used them to indicate a variable part.

3) Restart the Finder

Code: Select all

killall Finder
One warning though when making hidden system folders visible: They are hidden for a reason. Be careful when messing with them.

PS: It's very advisable and enlightening to do a

Code: Select all

man SetFile
Last edited by empireum on Fri Jun 01, 2007 9:19 pm, edited 1 time in total.

Embio

Post by Embio »

an easier way to do this is to use the excellent Onyx program, which also has a load more options in there

empireum
Donator
Posts: 3557
Joined: Sat Sep 30, 2006 5:00 pm

Post by empireum »

Embio wrote:an easier way to do this is to use the excellent Onyx program, which also has a load more options in there
You didn't read my post carefully. I mentioned OnyX and said it has the option to make all hidden folders/files visible. The approach I gave enables the user to selectively unhide or hide single folders or files.

colo

Post by colo »

Thx , very much!!!

Post Reply