Hidden .DS_Store files are appearing in Terminal when using ls -a command, but not in Finder.

I have tried used keyboard shortcut Command + Shift + ., which toggles display of other hidden files and directories such as .gitginore and .git in Finder, but does not do so for .DS_Store files.

What is going wrong?

  • I use muCommander for various reasons and it shows .DS_Store files. It does require a Java Runtime Environment (JRE) 1.8 or later. There may be other file managers that do not require Java and can show all hidden files even .DS_Store files. Note: I'm not affiliated with the developer of muCommander. – user3439894 Mar 29 at 12:52
  • What OS version, please? – user3.1415927 Apr 3 at 1:38

.DS_Store are special metadata files created automatically by Finder.app.

Finder.app is programmed to keep .DS_Store files hidden even when using the Command + Shift + . keyboard shortcut to toggle display of hidden files.

Since they are not user managed files and are intended to be used internally by Finder, they are not treated like other hidden files and kept hidden despite using the said shortcut.

The aforementioned is w.r.t. macOS Mojave 10.14.4.

  • 2
    Oh ok, thanks. And thanks for editing my question to make it clearer :) So in conclusion, the only way to see if I have DS_Store files is using terminal, there is no way to make it visible in Finder? Are there are any other files in Terminal that are not visible, ever? – mcplums Mar 29 at 12:39
  • 1
    @SimonKones Yes. I am not aware of any other hidden files with similar behaviour. – Nimesh Neema Mar 29 at 12:42
  • 1
    This might need a version specification; IIRC, I can often view those files and needed to teach myself not to move them when drag-and-dropping large numbers of files around the Dropbox folder... – user3.1415927 Mar 29 at 17:21
  • 1
    This answer is inaccurate. These files may be viewed in finder; see this answer – user3.1415927 Apr 3 at 1:59

I'm not sure what command the Cmd+Shft+. shortcut invokes, but to truly show hidden files (on 10.9.* through 10.13.*, as of today), use terminal to execute:

defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder

For 10.6.* through 10.8.*, use (note the capitalization difference in the first instance of Finder):

defaults write com.apple.Finder AppleShowAllFiles TRUE; killall Finder

Source: http://osxdaily.com/2009/02/25/show-hidden-files-in-os-x/
(I'm definitely not a fan of osxdaily.com, but it works.

Additionally, to check on your current value, use

defaults read com.apple.finder AppleShowAllFiles

... and for simple usage of the defaults command, just enter defaults with no arguments.

I verified that the value on this system is set to TRUE and I can see all the .DS_Store files as seen below... (using 10.11.6)

hidden files visible

  • The mentioned commands doesn't appear to work under macOS Mojave. – Nimesh Neema Apr 3 at 11:36
  • No indication of os version in question. – user3.1415927 Apr 3 at 12:14
  • I have edited my answer and added a note mentioning the behaviour as it works in macOS Mojave. – Nimesh Neema Apr 3 at 12:15

You must log in to answer this question.

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