4

How can I permanently compel the Finder to show me hidden files?

Previously I've done this by configuring the Mac OS X user defaults system as suggested in this answer:

defaults write com.apple.finder AppleShowAllFiles true
killall Finder

However that command does not work on Monterey. Adding a screenshot below of what I've tried.

A screenshot showing hidden files in Desktop revealed in Terminal, which are not shown in the Finder Desktop

7
  • 1
    It's not that the command doesn't work (though it's long been replaced by the much simpler Cmd/Shift/. [full stop/period]) it's that even with hidden files showing, it will still hide some files, .DS_Store etc.
    – Tetsujin
    Apr 16, 2022 at 11:19
  • 1
    This question is a duplicate of the question you have linked to. Have your read all the answers posted at the linked question? Apr 16, 2022 at 13:08
  • Ah thank you @Tetsujin - it seems .DS_Store and .localized are files that aren't shown even with "com.apple.finder AppleShowAllFiles" set to true. Apr 16, 2022 at 14:58
  • @David Anderson I did read the other answers linked in the post and none of the solutions there solved my problem because I was looking at .localized and .DS_Store. This question is not a duplicate. Apr 16, 2022 at 14:58
  • EricAndrewLewis: Which version of macOS (OS X) were you previously using where .localized and .DS_Store appeared on your Desktop after using the answer given in your question? Apr 16, 2022 at 17:24

4 Answers 4

2

The desktop is not the dock is not the finder. So the same one file can exist in all three places visually and be shown differently.

You would need to open a finder window and navigate to the desktop folder to see the finder view of the contents of that directory. Both .localized and .DS_Store are specialized files which serve as hidden metadata which will affect how files other than themselves are presented. Most normal document files should be easy to manage as hidden or not but those are special cases.

2
  • I think the Desktop may be part of the Finder. It seems the setting "com.apple.finder AppleShowAllFiles" and pressing Command+Shift+. both affect the Desktop view and a Finder window. Thanks for the note about .localized and .DS_Store being special cases here. Apr 16, 2022 at 14:53
  • @EricAndrewLewis: I do not think the Desktop is part of the Finder. You can enter the command osascript -e 'tell application "Finder" to quit' and the Desktop will still be there without the file icons and names. Apr 16, 2022 at 21:47
2

The command referred to does generally work, except for some particular files which I was attempting to look at including .DS_Store and .localized.

1
1

In any Finder window, press Command+Shift+. This will toggle the show all files (including hidden ones).

1
  • 1
    Evidently, not necessarily all files. Apr 17, 2022 at 0:50
0

You very reasonably ask "How can I permanently compel the Finder to show me hidden files?". The short answer is you can't! Finder has changed.

With Big Sur and even more with Monterey, Finder no longer shows the file system unadulterated. Even with Command+shift+., Finder does not show the full file system.

Three examples:

  • The Documents folder as shown by Finder may have extra folders when hidden files are shown. Mine includes a hidden folder called BBEdit which in the file system is ~/Library/Containers/com.barebones.bbedit/Data/Documents. This example is not present in ls -a ~/Documents

  • When Finder shows the Applications folder it is combining two locations in the underlying file system, that is /Applications and /System/Applications. For example you won't find Mail in ls -a /Applications.

  • Finder hides some files (even with show hidden files). As you have found this includes .DS_Store which is always hidden.

There are various ways to see the true file system:

  • The Terminal app and the ls -a command shows the file system.

  • Use ForkLift from binarynights or other 3rd party Finder replacements. ForkLift is much closer to the true file system. It shows .DS_Store, and doesn't show pretend Documents folders. But it does show the combined view for the Applications folder.

I presented this as Finder lying about the file system. The alternative view is that Finder shows you what you need to know. Those who want (or even need) to see more will know how to do so!

Note: In the above I have deliberately referred to Documents and Applications (and not ~/Documents and /Applications) where I am referring to the pseudo-locations presented by Finder.

You must log in to answer this question.

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