Blog by an Apple Certified Tech

MAKING A FILE/FOLDER INVISIBLE

How to hide a file/folder using Terminal

This is one of the greatest technique that I ever came across, I had to share my Mac in office and was curious about hiding confidential data. This was when I started exploring and finally came up with this solution.
These commands are to be typed in Terminal.
To make a file or folder invisible in Mac OS X Finder
setfile -a V testfile.txt
Here is goes, the file or folder is no longer visible via the Finder GUI, though it will be by Terminal. Your files are still there and you can find them via the command line and will show with an ls command. If you want your files and folders to be visible again, use this command:
To make a file or folder visible again in Mac OS X Finder
setfile -a v testfile.txt

Now the file/folder will be visible again to the Finder, cool isn't it?
Please Note: setfile is a command line utility included in Apple’s Developer Tools, which is a highly recommended optional install included on any Mac OS X install/restore CD/DVD. This is also available as a Xcode download from Apple’s Developer center.
More links & video about hiding.

4 Comments:

Anonymous said...

Hmmm... great one. I know one anothr way, i read it in one of ur old post, Y dnt u compile both of them?

AL Humam said...

Gud idea buddy, would be doing in the main website http://macmasters.net

Thank you.

Anonymous said...

Well intended I think, but useless for simpleuser folks like me who open Terminal once every two years and who need step-by-step instructions. Because the part about how to install setfile - wtf is a
command line utility? - is only comprehensible to a developer. Guess I'll keep looking.....

girl games said...

Hello, nice post :)