Mac OS 9 used filesystem bits to make files and folders (in)visible so you used to have to use programs like ResEdit to flip the bit to hide and show things. While Mac OS X supports this method as well, there’s an easier way.
Inside the root level of your disk is a file called .hidden that contains a list of filenames to not display in the Finder. Simply edit this list to hide/show items. If you want the same in other folders on your computer you’ll need to use the SetFile command (below) simply make a file called .hidden in the parent folder of the file or folder you want to hide. Programs can still access the hidden item normally, but the Finder will not display it.
You can use this when setting up a system for those that find ways of breaking things. Edit .hidden to hide the /Library and /System folders and then there’s little they can do to their system (their account is a whole other matter).
You can also use this to make a private folder that’s hidden from normal use. If you give the folder a creative name, it’s almost like a password. To get to it easily, use the “Go to folder…” item in the Finder’s Go menu and specify the exact path to and name of the folder. When you close the window there’s nothing left to let people know it exists (unless you have the Apple Menu set to remember your last-opened Documents, which you don’t, right?).
It’s not real security, and I don’t claim it is. Anyone can open the .hidden file and see the list of hidden files in a folder (indeed, anyone must be able to since the Finder must be able to read it to hide the files). But for the casual user, it works well.
For files outside the root of a drive, you can use the SetFile command, included with the Developer Tools, to set the invisibility bit of the item.
SetFile -a v ~/my-file-or-folder
Using an upper-case ‘V’ will undo it:
SetFile -a V ~/my-file-or-folder
bin share manin it.. restarted Finder and I can still see those folders. I am trying to hide ~/bin etc. since I installed some software in my home directory... dAVEAlas, while I thought it worked I just didn’t see the files right in front of me.
.hiddenonly works in the root of a volume; elsewhere you need to use the invisibility bit/flag. Luckily no TP software is needed (other than the DevTools) and there’s an easy command to set it.—
cp
Post new comment