You are on page 1of 7

Jan 6, 2012 - 25 Comments

Hide Folders in Mac OS X


Need to hide a folder or two on a Mac? A while back we showed you how to make invisible
folders and to even how to make hidden folders in Mac OS X, but now were going to
demonstrate how to turn an existing folder into a hidden folder.
How to Hide Folders in Mac OS X
Hiding existing folders is fairly easy:
Launch the Terminal, found in /Applications/Utilities/ or from Launchpad
Type the following command:
chflags hidden /path/to/folder/
When nished, close out of Terminal
For example, to hide a folder in my home directory named Secrets the command would be:
chflags hidden ~/Secrets/
The folder will immediately disappear from visibility, becoming hidden from the Finder. This
includes everything contained within the folder as well, whether they are more les or other
folders.
If you want to truly hide the folder and its contents, take an extra step and exclude the folder
from Spotlight indexing. This makes sure that none of the les inside of it can be found through
the Spotlight search feature in OS X.
While this hides folders from being visible in the GUI and will keep 95% of users unaware of the
folders existence, keep in mind that practically anything is visible from the command line, and if
an advanced user was keen or determined enough, they could probably track down the folder
or its contents.
Access the Hidden Folders in Mac OS X
Now that the folder is hidden, here is how to access it:
From the Mac OS X desktop, hit Command+Shift+G to bring up the Go To Folder
window
Enter the same path to the folder as you used when hiding it:
43k Like Like Follow Follow @OSXDaily @OSXDaily
Subscribe to OSXDaily

Find us on Facebook
OS X Daily
43,527 people like OS X Daily.
Facebook social plugin
Like Like
OSXDaily
+ 5,093
Follow +1
Search
Home Mac OS X iPhone iPad Tips & Tricks Jailbreak News iOS
Hide Folders in Mac OS X http://osxdaily.com/2012/01/06/hide-folders-mac/
1 of 7 09/07/14 10:47 AM
Youll now be inside the hidden folder, able to open, copy, move, and use the contained les
and folders as usual.
Unhiding the Folder in Mac OS X
If you no longer want the folder to be hidden anymore, heres what to do:
As before, launch the Terminal application
Enter the following command:
chflags nohidden /path/to/folder/
Close the Terminal
As an example, to unhide a folder on the users desktop named Secret Folder the command
would be:
chflags nohidden ~/Desktop/Secret Folder/
Again, the folder will become immediately visible to the desktop. If you blocked the contents
from Spotlight, you may want to remove it from there as well to be able to nd and locate as
usual.
If you read OSXDaily with any regularity, some of this will be familiar to you for good reason. The
chags nohidden command is the same thing we use to show the Library directory in OS X
Lion, and accessing the folder once it is hidden is done the same way we access the user
Library folder when its hidden as well.
43,527 people like this. Like Like
Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of
our great Apple tips, tricks, and important news delivered to your
inbox! Enter your email address below:
Subscribe
Related articles:
Hide Anything from Spotlight in Mac OS X with the Library Folder
Quickly Hide a File in Mac OS X Using chags
Hide the Toolbar in Mac OS X Finder Windows
Hide Folders in Mac OS X http://osxdaily.com/2012/01/06/hide-folders-mac/
2 of 7 09/07/14 10:47 AM
Show the Path Bar in Mac OS X to Work Better in the Finder File System
Posted by: Paul Horowitz in Command Line, Mac OS X, Tips & Tricks
25 Comments
Comments RSS Feed
Fernando says:
January 6, 2012 at 1:24 pm
I think the last Terminal command typed should be:
chags nohidden ~/Desktop/Secret\ Folder/
Reply
Brian Yang says:
January 6, 2012 at 1:37 pm
For privacy I wish I had known about this in the days where I shared a computer with my family!
Nowadays, this allows ultraminimalism without disabling everything in entirety.
Reply
Ren Dubois says:
January 6, 2012 at 11:03 pm
Excellent use of chags
Reply
A.J. says:
January 6, 2012 at 11:15 pm
Not able to hide an existing folder.
If I have an existing folder in my desktop entitled AJ is this how i would type it?
chags hidden ~/desktop/AJ/
thanks
Reply
BT says:
January 7, 2012 at 12:53 pm
Close, itd be :
chags hidden ~/Desktop/AJ/
capitalization is important
Reply
Brian says:
January 9, 2012 at 9:52 pm
Capitalization isnt actually that important, unless youre on an HFS+ Case Senstitive
volume.
Reply
James says:
January 7, 2012 at 10:29 am
I think a better way to keep content on your Mac private is to create a small encrypted disk image
with a password. Even if someone does snoop, they cant open it.
On mine, I change the icon to a regular folder and name it something boring so it doesnt stand out.
Instructions on Apples site:
Hide Folders in Mac OS X http://osxdaily.com/2012/01/06/hide-folders-mac/
3 of 7 09/07/14 10:47 AM
http://support.apple.com/kb/ht1578
Reply
EldRick says:
January 7, 2012 at 12:35 pm
Its a lot easier to just use InvisibleX
Reply
Password Protect Zip Files in Mac OS X says:
January 7, 2012 at 2:10 pm
[...] Adding an additional layer of security to a hidden folder [...]
Reply
Patirck says:
January 8, 2012 at 2:56 am
Does this work in Tiger? I have an old PPC MacMini that Im using as a ler server with two external
drives. I was wanting to hide some folders on those external volumes. When I use the command
chags hidden /path it comes back with chags: invalid ag: hidden.
Reply
er says:
January 8, 2012 at 7:11 pm
Tiger might not run Bash in the terminal by default.
Launch terminal and type: env
If one of the lines says:SHELL=/BIN/TCSH
then you need to change it.
If you need to change the shell, start Netinfo Manager in /Applications/Utilities. Then click on
users and then your short username. Replace /bin/tcsh in the shell entry with /bin/bash. Save
your changes, logout and back in.
After all this it may still not work because chags may or may not work in Tiger.
Good luck
Reply
tripleman says:
January 8, 2012 at 10:10 am
I dont think that excluding the folder from spotlight is a great idea. It doesnt take a genius to just
look at spotlights preferences to see what you dont want to be found.
Reply
Jim says:
January 9, 2012 at 6:57 am
Hideaway.app much easier and faster.
Reply
A.J. says:
January 10, 2012 at 2:24 am
Thank you BT, that worked. OK now my problem is that Now that the folder is hidden, I can not
access it.
Per the instructionsNow that the folder is hidden, here is how to access it:
From the Mac OS X desktop, hit Command+Shift+G to bring up the Go To Folder window. Enter
the same path to the folder as you used when hiding it:
When I type the le path I use to hide the folder my result says, le can not be found
Reply
Hide Folders in Mac OS X http://osxdaily.com/2012/01/06/hide-folders-mac/
4 of 7 09/07/14 10:47 AM
Andy says:
April 23, 2012 at 2:42 am
I hope you are not trying with the whole chags thing again in Go To Folder. Just type the path
of folder i.e. the chags command without chags hidden.
TIP:
After hiding the folder see the command, leave the rst two words (chags hidden) and copy
the rest somewhere to remember. Because that is what you need to type in Go To Folder
every time you need those hidden les.
Reply
Andy says:
April 23, 2012 at 2:25 am
In the example given to access the hidden folder you should use
~/Secrets/
in the Go To Folder
Reply
Cabel says:
April 26, 2012 at 6:10 pm
The only problem is that all you have to do to see a hidden le or check if there are any hidden les
is enter
defaults write com.apple.Finder AppleShowAllFiles YES in a command line. Is there any way to
make it hidden from even that?
Reply
Fernando says:
April 30, 2012 at 11:11 am
Hi, I have a usb drive that I use for work (and winxp), so I got infected with something that change
the folders on the usb: all the folders are transformed into a .exe (with the virus on it) and the real
folder become hidden. (The trick is if you double click on it, it will show you the les they still are
in the real-hidden folder AND execute the virus on your pc)
But, if use this command, I can unhidden this real folder, until I dismount this drive: next time I
mount this drive, folders will be hidden again. How can I permanently nohiden a folder in a usb
drive?
Of course, the rst thing is to wipe my pc
Reply
Quickly Hide a File in Mac OS X Using chags says:
July 19, 2012 at 6:00 pm
[...] to quickly hide a le from prying eyes? Just like you can hide folders, you can hide
individual les too. Here is how to do this using the command line tool [...]
Reply
shiningjade says:
July 26, 2012 at 11:36 am
the chags actually works.
however, it is unlock the damned folder, but not the contains.
my mate gave me a single folder which contains a considerable amounts of sub folder. And each
sub folder has bunch of les.
do i have to unhide the damned les one by one ?
Reply
SyberKnight says:
October 25, 2012 at 2:34 pm
Hide Folders in Mac OS X http://osxdaily.com/2012/01/06/hide-folders-mac/
5 of 7 09/07/14 10:47 AM
Access the Dictionary in iOS to
Quickly Look Up Words
Mac Setups: Three Decades of
Apple, From the SE/30 to the iPad 2
can this also be done to the root level System and Library folders?
Reply
jahed hossain says:
January 12, 2013 at 11:57 am
very good
Reply
calvin says:
February 27, 2013 at 1:55 pm
this is all very helpful, but when i hide the folder with everything in it the les still come up if i merely
go to all my les.
Reply
Rahul says:
January 15, 2014 at 6:58 am
How can I add space in Terminal. whenever I try hiding my folder New Files it doesnt work.
Thank You
Reply
IT says:
January 15, 2014 at 9:26 am
For placing spaces functionally in the terminal, use quotes or a backslash in the command
string, like so: New Files or New\ Files
Reply
Leave a Reply
Name (required)
Mail (will not be published) (required)
Website
Submit Comment

OS X Daily
Email us: osxdailycom@gmail.com
Contact Us | Privacy Policy | Sitemap
This website is unrelated to Apple Inc
All trademarks and copyrights on this website are property of their respective owners.
2014 OS X Daily. All Rights Reserved. Reproduction without explicit permission is prohibited.
Hide Folders in Mac OS X http://osxdaily.com/2012/01/06/hide-folders-mac/
6 of 7 09/07/14 10:47 AM
Hide Folders in Mac OS X http://osxdaily.com/2012/01/06/hide-folders-mac/
7 of 7 09/07/14 10:47 AM

You might also like