in snow leopard, how make files "invisible"?

in snow leopard, how make files "invisible"?

MacBook Pro, Mac OS X (10.6.8), 2.53GHz Core 2 Duo, 4G RAM

Posted on Jul 12, 2012 8:46 AM

Reply
10 replies

Jul 12, 2012 11:08 AM in response to noondaywitch

noondaywitch wrote:


Correct - it shows / hides files which are already hidden.


You can't create a hidden file directly - the OD won't let you make a file name starting with a period.


It will probably be possible by changing a file's attributes from Terminal, but you need someone else to tell you how.

Actually, if you check the "Show hidden and system files" option, and click the Relaunch Finder button then you can add a "." to the beginning of the file name. Although this kind of defeats the purpose of hiding the file. You would then have to uncheck the option and relaunch again to complete things.


I found another alternative. Make and save an Automator App to add the "." to the beginning of the file name. Then drag/drop the file onto the automator app icon and poof!


User uploaded file

Jul 12, 2012 12:20 PM in response to Wm Marston

You can make files or folders invisible from the Terminal. Enter the following command:


chflags hidden


Don't press enter yet. Put a space after the the word hidden and then drag and drop the item you want to hide into the Terminal window. Now press enter. The item will disappear from view.


You'd better copy that path down though, because if you want to unhide it, you need to know the full path and file or folder name.


As a test, I did one as:


chflags hidden /Users/myaccount/Desktop/test.tif


This of course is a file named test.tif sitting on the desktop of my user account. Upon hitting enter, it disappeared. To get it back, you unhide it:


chflags nohidden /Users/myaccount/Desktop/test.tif


The item will reappear. You can see where it would be very important to have that entire path written down. If you forget the name or where it is, you'll be lucky to find it by guessing. It's either that, or you'll have to use the trick to show hidden and system files. Then you'll be able to see the hidden item you're dragging and dropping item into Terminal to unhide it.

Jul 12, 2012 12:51 PM in response to WZZZ

For a folder, I think it would be chflags hidden -R <path to folder>

Just because I was curious, I tried that. The -R wasn't necessary to hide a folder.


I looked at the manual for that switch:


-R Change the file flags for the file hierarchies rooted in the

files instead of just the files themselves.


I would guess the -R stands for recursive, so it would hide not only a folder or application package, but anything within them would also be tagged with the hidden attribute. I can't see where that would be necessary. If you hide the folder, everything in it will be hidden with it anyway.

Jul 12, 2012 1:15 PM in response to Dansyacht

Dansyacht wrote:


Actually, if you check the "Show hidden and system files" option, and click the Relaunch Finder button then you can add a "." to the beginning of the file name. Although this kind of defeats the purpose of hiding the file. You would then have to uncheck the option and relaunch again to complete things.


Nice spot, dansyacht - that does indeed work. Always nice to be able to stay out of Terminal when I can!

Nov 13, 2012 11:20 AM in response to WZZZ

You can also from terminal make a invisible text file using the nano text editor. Start the file name with a peirod this will make it a invisible file. Like if I wanted to make a invisible file called file1 I could type in nano .file1 and it would open the nano text editor after I type in my text I can press control x and then y to save and it would be invisible.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

in snow leopard, how make files "invisible"?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.