Hidden directories?

untz

Registered
How do you toggle (on/off) hidden directories in bash?

For example, I have a .MacOSX hidden directory under ~ and it contains my property lists (.plist). I just don't know how to view it under Finder. If I do a "cd ~/.MacOSX/" then becomes visible... I would like to learn how to make any file, invisible / visible, on my own command...

With thanks!
 
You can use a tool like TinkerTool (available from versiontracker.com) to make all hidden files visible, or, in the Terminal, do an "ls" with the -a option to list all files, visible or invisible.
 
I know about the "ls -a"... I am asking how to make them explicity invisible so you couldn't find it in Finder?

Thanks...
 
You can change the invisibility attribute of files and folders with the SetFile utility that's included with the developer tools. If it's installed, it'll be in /Developer/Tools along with some other goodies. Usage is pretty simple:

SetFile -a V <filename>
SetFile -a v <filename>

Using a capital V makes the file invisible, and lowercase makes it visible.
 
Yup, it should work just fine. And you can run SetFile without specifying any options to see the list of functions it can perform. It's mostly for modifying specific HFS/HFS+ information about files that the traditional UNIX commands aren't designed to handle. Invisibility happens to be one such option.
 
Back
Top