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.
.localized
and.DS_Store
appeared on your Desktop after using the answer given in your question? – David Anderson Apr 16 '22 at 17:24.DS_Store
,.localized
and any files starting with._
. Anyway, it is interesting the some files are omitted. – David Anderson Apr 17 '22 at 00:59