There is an app called XtraFinder which does exactly that - it shows hidden files while it can still hide those two files from Desktop only.

Is it possible to do something like that without installing a 3rd party app (I'm using Mavericks)?

  • 1
    Read this post about the build in dot_clean app: – CousinCocaine Jul 22 '15 at 21:32
  • Thanks for the link, however, seems like this is not exactly what I need since this (and other links from that discussion) is trying to delete ._* files (and that is on network drives mostly). AFAIK, deleting of .DS_Store files is not recommended (or even possible), so I suppose I should find a way just to hide them while having all other hidden files visible... – errata Jul 23 '15 at 18:16

This first command will remove all the icons on your Desktop, but keep the files visible in finder:

defaults write CreateDesktop -bool false && killall Finder

While this second one will restore all the icons on your Desktop:

defaults write CreateDesktop -bool true && killall Finder
  • 1
    Hm, but this still doesn't hide .DS_Store and .localized files only... It hides/shows all the Desktop icons but that's not what I'd like to achieve... – errata Apr 25 '16 at 9:34

I came up with a brilliant way of doing this today.

Where do you usually have your Dock bar? Move it to the opposite side temporarily. Grab both the files and position them as far as possible off the screen on the side that you previously had your Dock. Now, switch the Dock back to the previous side. HIDDEN!

  • 1
    And what if you auto-hide your Dock? – iProgram Jun 17 '15 at 16:13
  • 1
    Which I usually do hide, yes... :) – errata Jun 18 '15 at 10:19
  • 1
    Great idea, but sadly my .DS_Store icon is larger than my dock! – Hubert OG Oct 14 '15 at 22:49

Run this command:

chflags hidden ~/Desktop/.DS_Store && chflags hidden ~/Desktop/.localized
  • This didn't help... Just to be clear, I ran this command in order to show hidden files because I have to see them all the time: defaults write AppleShowAllFiles YES and I want to see all hidden files except those two on the Desktop. – errata Jun 18 '15 at 9:56
  • Oh, on the desktop. for some reason I was thinking you meant your user folder. 1 sec and I'll fix the path. – MarcusJ Jun 18 '15 at 9:59
  • I used the correct path: chflags hidden ~/Desktop/.DS_Store && chflags hidden ~/Desktop/.localized but still it didn't completely hide them... – errata Jun 18 '15 at 10:00
  • You're right, it doesn't fix it. you can set defaults write AppleShowAllFiles YES to NO, then use chflags nohidden to unhide the folders you're interested in. I've used this method before and know it works. – MarcusJ Jun 18 '15 at 10:03
  • Ah yes, I know that, maybe I'm just too lazy to go through un-hiding everything I need... I was thinking this is an easy thing to do because the App I mentioned (XtraFinder) can do exactly that... – errata Jun 18 '15 at 10:18

Just like any other hidden file on your Mac, .DS_Store and .localized are going to be one of those files that appear when you turn hidden files 'on'.

Without 3rd party applications you are not able to hide them without hiding every other hidden application.

One thing you can do is, if there is only 1 or 2 hidden files/folders for eg. make aliases which in Windows standards are shortcuts. So Right Click the file > Make Alias.

Then when all files are hidden, the alias/s will still be visible rendering the file/folder openable.

Another thing you can do is actually delete .DS_Store and .localized which according to Wikipedia (I know, not the most reliable source but multiple other websites also said it)

.DS_Store is a proprietary format hidden file created by Apple Inc.'s Mac OS X operating system to store custom attributes of a folder such as the position of icons or the choice of a background image.

The '.localized' files just indicate (by their presence) that apps should display the "localized" name for a given folder if one has been defined. So for example, instead of the folder names showing as "Library" or "Users", someone with their language set to "French" in the "International" pref pane would see "Bibliothèque" or "Utilisateurs" in "Finder" or through "Open" and "Save" dialogues.

The .localized file basically makes it use the system's language for files (Mine is in English so it shows English).

  • What 3rd party apps do you recommend? I too like to see all hidden files while in the finder, but not on the Desktop view :( – Leon Gaban Mar 6 '15 at 4:43
  • @LeonGaban I was using XtraFinder which has some other nice features... – errata Mar 6 '15 at 12:00

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.