New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

"Invisify" files and directories in the Finder

Post Reply New Thread Subscribe

Thread Tools
Posts: n/a

You can show and hide invisible . files (dotfiles) in the Finder using the defaults command in the Terminal:
Show all:
defaults write AppleShowAllFiles '1'
Hide all:
defaults write AppleShowAllFiles '0'
Then relaunch the Finder:
kill -1 `ps auxc | grep Finder | awk '{print $2}'`

If the invibility bit has been set by another method than prepending a . before the filename, you may be better off with an application that can hide/show these files/folders that have an 'invisible' flag set:
(Yes, there is an English version.)

Making files invisible
It is also possible to selectively make files & directories invisible rather easily.

If the file/directory to be made invisible 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 and issue these commands exactly as they appear below:
sudo -s
cp -p /.hidden /.hidden.default
echo 'dirname' >> /.hidden
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 set the visiblity bit of the named file/directory on the non-boot drive, thus making it invisible to the Finder.
QUOTE Thanks

Fluid's Avatar
Member Since: Dec 23, 2002
Location: California
Posts: 454
Fluid is on a distinguished road
Mac Specs: 15" iMac 700 MHz G4 640 MB

Fluid is offline
Thanks for the tip! HeHe "Invisify" HeHe
QUOTE Thanks

rman's Avatar
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,584
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
Thanx for the tip.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks

Post Reply New Thread Subscribe

« Single User Mode Start Up | Open GUI applications as root »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Deleting Hidden files... ldj OS X - Operating System 15 03-16-2013 11:24 AM
make and CDRecord plunger OS X - Development and Darwin 3 12-29-2003 05:49 PM
Saving Files mdscouter OS X - Operating System 0 12-14-2003 12:55 PM

All times are GMT -4. The time now is 04:11 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?