Terms of Use For FixedByVonnie

By proceeding to access fixedByVonnie.com, you expressly acknowledge, and agree to, all of the following:

fixedByVonnie.com is a personal website and blog owned by Security Plus Pro LLC, which is being presented for informational purposes only. The views on this website are solely those of the website owner (and not those of any employer or of any professional associations affiliated with the website owner).  Any views expressed in this website and any information presented on this website, or in any of its blog entries, should not be relied on for any purpose whatsoever other than as the personal opinions of the website owner.  The website owner expressly disclaims any and all liability for any information presented on this site.  The owner of this website and its blog posts shall not be held liable, and shall be held harmless, for any errors or omissions in any information or representations contained in this website, or in any of its blog entries.  The website owner also expressly disclaims any liability for the current or future availability of any such information. The website owner makes no representations as to the accuracy or completeness of any information on this website or which may be found by following any link on this website. The website owner shall not be held liable for any losses, injuries, damages, claims, or causes of action, from the display or use of any information on this website or in any of its blog entries. If you use the information on this website, or on any of its blog entries, you do so solely at your own risk.

How to hide files and folders in Mac OS X - fixedByVonnie

How to hide files and folders in Mac OS X

How do you hide a file or folder in Mac OS X?

In Windows it’s easy.  Just right click a file or folder and put a check in the Hidden box.

Hiding a file or folder in Windows

In Windows 8 and 8.1, you can also select the item, pick the View tab in the Ribbon near the top of the File Explorer window and choose Hide selected items.Hide selected items in Windows 8.1 File Explorer

Easy breezy.

But right-clicking a folder in Mac OS X yields no such “Hidden” option.

Right clicking a folder in Mac OS X

In fact, if you make a new folder (Shift + Command + n), right click the folder and choose Get info (Command + i), you won’t see any option to Hide or Unhide.

Get Info in Mac OS X

Looks like Apple doesn’t like secrets.

This is such a basic task that I don’t know why it isn’t more prevalent.


Anyway, to hide a file or folder you need to visit the terminal.

Press Command + Space and type:


Now type this command in the terminal window but don’t press enter yet. We’re going to paste in the path to the file or folder by dropping the item directly into the terminal window.

chflags hidden

Note there’s a space after the word “hidden”

chflags hidden in Mac OS X

chflags lets you change the flags of a file or folder.  By entering the hidden parameter we can hide the file from the GUI (from the Finder).  Just keep in mind you (or someone) could easily access the item just by pressing Shift + Command + g and manually entering the path preceded by a tilde character (the tilde is an alias for your user folder).

For example, if you hid a folder named secret that was sitting on your desktop, you could display the contents by typing this in the Go to the folder: box


Go to folder in Mac OS X

To unhide the folder, just type nohidden with the full path to the hidden folder

chflags nohidden ~/Desktop/secret

There you go.


On a side note, files and folders that start with a period (.) are hidden from the Finder.  You can rename a file or folder from the terminal by typing:

mv oldfilename newfilename

So if I wanted to rename the secret folder to .secret I would type:

mv ~/Desktop/secret ~/Desktop/.secret

Renaming a file or folder in Mac OS X from the Terminal

We basically just used the mv command (move) to move the folder into the same place and overwrote it with the new dot name.

Now it’s hidden

And that my friends is how to rename files and folders in Mac OS X.

Am I the only one who things this is nuts?  Why can’t Apple just put a “Hide” button in Get Info?  How difficult is it to code a “Hide” option that shows up when you Control click an item.


Connect with Vonnie on Twitter

Posted in Apple, Mac OS X 10.10 Yosemite, Mac OS X 10.8 Mountain Lion, Mac OS X 10.9 Mavericks Tagged with: ,