2

I just received a new MacBook, running OS X El Capitan 10.11.5, from my new employer and I am unable to force hidden files to show in Finder. This is my fourth MacBook, and in the past I have always used defaults write com.apple.finder AppleShowAllFiles YES to show hidden files; however, on my new Mac, this is not showing the hidden files. I also tried defaults write com.apple.finder AppleShowAllFiles TRUE but still cannot see hidden files in Terminal or in Finder. I restarted my computer, but that didn't solve my issue either. Any ideas on how to show my Mac's hidden files?

0
3

After you run the defaults write com.apple.finder AppleShowAllFiles YES command, hold the 'option/alt' key, then right click on the Finder icon in the dock and click Relaunch.

4

Try this:

defaults write com.apple.Finder AppleShowAllFiles -bool true; killall Finder

This sets AppleShowAllFiles to true which tells Finder to show all file. Note the -bool part, that tells will make sure you are setting a Boolean to it instead of string, integer etc. Finally it restarts Finder.

2
  • Welcome to Ask Different. We like answers to be more than just a single line. Ideally, you want to explain why your answer is *right." It also helps to provide links, citations, and/or screen shots. Please review our help section How to Answer on writing good answers to questions
    – Allan
    Jul 11 '16 at 1:45
  • @Allan Edited with explanation.
    – Tom Shen
    Jul 11 '16 at 1:58
1

Since High Sierra, you can show hidden files in the Finder with the key command: Command Shift Period. This also toggles the show/hide status.

No need for Terminal commands or third-party utilities, or relaunching the Finder.

3
  • RE: "No need for Terminal commands or third-party utilities, or relaunching the Finder." -- While that statement has been true since macOS Sierra (10.12) it was however not true at the time when the question was asked, as at that time the current Apple operating system was OS X El Capitan (10.11) and did require what the accepted answer states, or the use of a third-party utility. Apr 13 at 12:03
  • RE: "This also toggles the view." -- What? The view in Finder typically refers to, as Icons, as List, as Columns, as Gallery and pressing ⌘⇧. does not change the view. Apr 13 at 12:09
  • @user3439894 OK, poorly phrased: this toggles the view status of hidden files. Will add "since High Sierra", too.
    – benwiggy
    Apr 13 at 14:03
0

Detailed

You can make all hidden files visible with this command in the Finder.

defaults write com.apple.Finder AppleShowAllFiles 1 && killall Finder

However, I prefer not to display hidden system files via the terminal, but rather with a shortcut.

CMD + SHIFT + .

If you want, you can make a file (several files) visible or invisible again. - Even if you remove the "hidden" attribute with chflags, this has no effect if setfile has also stored an attribute

chflags hidden /path/to/file (Hides the file from the Finder)

chflags nohidden /path/to/file (Does not hide the file from the Finder)

If the file cannot be made visible again, it may have been hidden using setfile. SetFile

setfile -a V /path/to/file (Hides the file from the Finder)

setfile -a v /path/to/file (Does not hide the file from the Finder)

(To use this command you need the developer tools) xcode-select --install

Note: There are several types of "hidden" files: those that begin with a period and those that are hidden with chflags or the developer's command line utility Setfile.

You can see the hidden files that were hidden with chflags here

 ls -lO /path/to/directory
1
  • 1
    There are two types of "hidden" files: Those starting with a dot, and those set to hidden with chflags hidden. Your answer applies partially to either but doesn't clearly differentiate.
    – nohillside
    Apr 17 at 13:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .