[FAQ] "Hidden" Files

typo180

Registered
There are a few files on my iMac that I downloaded using Aquisition, but they don't appear in the folder they are supposedly in. I can find them using Shelock 2 in OS9, and they can be uploaded through auisition, but I they don't show up in the OSX Finder at all. How do I delete them?
 
You can show and hide invisible . files (dotfiles) in the Finder using the defaults command in the Terminal:
Show all:
defaults write com.apple.finder AppleShowAllFiles '1'
Hide all:
defaults write com.apple.finder AppleShowAllFiles '0'
Then relaunch the Finder:
kill -1 `ps auxc | grep Finder | awk '{print $2}'`
 
It is also possible to selectively make files & directories invisible rather easily.

If the file/directory is on the root level, the easiest solution is probably to add 'dirname' (where 'dirname' is the file/directory to be hidden) to the .hidden file that lists items on the root level of the boot volume (/) to keep hidden from the Finder; then relaunch the Finder to affect the change. Lanuch Terminal.app and issue these commands exactly as they appear below:
sudo -s
cp -p /.hidden /.hidden.default
echo 'dirname' >> /.hidden
exit
kill -1 `ps aucx | grep Finder | awk '{print $2}'`


Alternately, if you have the Developer Tools installed, you can set the directory's invisbility bit:
/Developer/Tools/SetFile -a V /dirname

If it is a non-root level directory to be made invisible, the command would be along these lines:
/Developer/Tools/SetFile -a V /Volumes/drivename/dirname
This will "invisify" the named file/directory on the non-boot drive, making it invisible to the Finder.
 
Back
Top