Information Technology Reference
In-Depth Information
a filename is reserved for system files, the type of file this technique is typi-
cally used to hide, but you can still choose to save the file.
Hiding Files So Mac Apps Can't See Them
The
CHFLAGS
can be used to hide files so they don't show up in graphical user
interface (GUI) applications. However, they'll still be visible if anybody
browses files using a Terminal window.
To hide files in this way, open a Terminal window (open Finder, select the
Applications list, and then in the list of applications double-click Terminal
within the
UTILITIES
folder), and use the
CHFLAGS HIDDEN
command, specifying the
file or folder name immediately afterward. For example, to hide
SECRET.DOC
, type
the following:
CHFLAGS HIDDEN SECRET.DOC
To unhide the file so it's visible via GUI software again, use the
CHFLAGSNOHIDDEN
command:
CHFLAGS NOHIDDEN SECRET.DOC
Viewing Hidden Files
So, if a file is hidden, how can you see it in order to open it again? In expanded
file open/save dialog boxes within apps (see
Tip 294,
Always See Expanded
items in the file listing. Hitting the key combo again will hide them. However,
be aware that you'll suddenly see lots of system files that are hidden in this
way. (Steer clear of these—don't delete or open them.)
The only way to see hidden files in Finder windows is to activate a secret
setting that shows them alongside other files. This will cause them to always
be visible within Finder windows and on the desktop, although hidden files
will have a washed-out appearance to indicate their status. Open a Terminal
window, and type the following:
DEFAULTS WRITE COM.APPLE.FINDER APPLESHOWALLFILES -BOOL TRUE;KILLALL FINDER
Even after making this change, you'll still have to hit
SHIFT
+
COMMAND
+
.
within
file open/save dialog boxes to see hidden files.
To revert to hidden files being hidden within Finder, type the following:
DEFAULTS DELETE COM.APPLE.FINDER APPLESHOWALLFILES;KILLALL FINDER