Go Back  Mac-Forums.com  > Software > OS X - Darwin and Development > "Invisify" files and directories in the Finder

Reply
 
LinkBack Thread Tools
Old 02-09-2003, 11:56 PM   #1 (permalink)
gatorparrots
Guest
 
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 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}'`

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:
http://www.versiontracker.com/mp/new_searc...rch=hide+folder
or
http://www.tice.de/m4e/a_software/c_invisibles.html
(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 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 set the visiblity bit of the named file/directory on the non-boot drive, thus making it invisible to the Finder.
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old 02-10-2003, 12:23 AM   #2 (permalink)
Fluid
General Population
 
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
Thanks for the tip! HeHe "Invisify" HeHe
__________________

Fluid@Mac-Forums.com
Fluid is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old 02-10-2003, 12:24 AM   #3 (permalink)
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,190
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.5.7
Talking

Thanx for the tip.
__________________
Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
rman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting Hidden files... ldj OS X - Operating System 8 08-08-2006 02:36 PM
make and CDRecord plunger OS X - Darwin and Development 3 12-29-2003 06:49 PM
Saving Files mdscouter OS X - Operating System 0 12-14-2003 01:55 PM

 
 
 
     
Home Calendar Get New
     

Copyright ©2001-2009 Mac-Forums.com. All Rights Reserved. A division of iNET Interactive.

Other iNET Interactive Sites: Web Hosting Talk | Swish Talk | Hosting Catalog.com| Dev Papers| Deleted Domains| Hot Scripts

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