8 ways to hide files and folders in OS X

There are plenty of good reasons you might want to hide some of your files or folders. Maybe you carry around a laptop and you just want to be extra safe. Maybe you share an account with others and need to keep some things private. Whatever the reason, here are eight ways to do it in OS X.

1: Enable FileVault

This is probably the simplest way to do it. Go to System Preferences’ Security & Privacy pane and turn on FileVault. That will encrypt your entire hard drive, so someone would need your password to get at its contents.

2: Hide them in the Library

Assuming your /Library folder is hidden (that’s the default in OS X Mountain Lion), hold down the Option key as you open the Finder’s Go menu. Navigate to that Library folder, then create a new folder there or just drag the files or folders you want to hide into it.

3: Put them in another user account

Create a new user in System Preferences’ Users & Groups preference pane, then put the files and folders you want to hide in that account.

4: Make the file/folder hidden 1

In Terminal, type chflags hidden and then drag a folder or file you want to hide into the Terminal window; you can still access those hidden folders and files by summoning the Go To Folder dialog (Command-Shift-G) and typing in their full paths. To unhide them, go back to Terminal and type chflags nohidden followed by the file or folder path.

5: Make the file/folder hidden 2

Again in Terminal, type mv filename .filename. This moves the original folder to one with a period at the beginning of its name; by default, folders with periods at the beginning of their names are hidden in OS X. You can also type mkdir .hiddenfolder to create a new hidden folder. In either case, you can again access the hidden folder using the Go To Folder option.

6: Hide in plain sight

Use innocent-sounding filenames such as Cat videos January 2013— LOL! instead of something more intriguing (Top secret).

7: Set visibility attribute to invisible

If you have Apple’s Developer Tools installed, go to Terminal and enter setfile -a V followed by the name of the file or folder. That sets its visibility attribute to invisible; you can undo this by repeating the command with a lower-case v.

8: Use a third-party solution

So that’s it: Eight different ways to hide files or folders in OS X. Thanks to writer Steve McCabe for the tips. You’ll find those and more in the story “100 More Things Every Mac User Should Know” in the April issue of Macworld.