Those annoying .DS_Store files

Discussion in 'macOS' started by Doctor Q, Apr 12, 2008.

  1. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #1
    I find it annoying that I leave a trail of .DS_Store files whenever I use the Finder with disk volumes over NFS, such as on a Unix server. (This is the file the Finder uses to store display information for each folder.)

    Luckily, I found an Apple Knowledge Base article that tells how to avoid it. Just type
    Code:
    defaults write com.apple.desktopservices DSDontWriteNetworkStores true
    in Terminal, for each user account. After that, .DS_Store files won't be created for remote file servers under NFS, SMB/CIFS, AFP, or WebDAV.

    Just thought I'd pass the tip along. :)
     
  2. richard.mac macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #2
    nice tip doc! but does this mean that all Finder windows on NFS will be the default size as they cant save window size and position data to the .DS_Store files?
     
  3. Doctor Q thread starter Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #3
    I think the answer is yes. So this setting makes sense when your habit is infrequent trips to NFS servers, but not if you use them for regular file browsing.

    And, of course, you can't set it as a preference for one directory at time, since it would need a .DS_Store file to save the preference in!
     
  4. bigwig macrumors 6502a

    Joined:
    Sep 15, 2005
    #4
    Wonderful! Now all we need is a preference to eliminate .DS_Store files in every directory, not just network mounted ones.
     
  5. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
    #5
    At this point, the best approach involves a cron script that invokes

    Code:
    find ~/ -name \.DS_Store -print0 | xargs -0 rm
    
    A question that does come to mind though: "Why the heck is Finder and UNIX in the same posting?" ;)
     
  6. bigwig macrumors 6502a

    Joined:
    Sep 15, 2005
    #6
    find ~ -name .DS_Store -delete -print

    Still annoying even if automated. .DS_Store shouldn't have been invented in the first place, it's a horrible idea on any multi-user system (as OSX is).
     
  7. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
    #7
    Heartily agreed.

    http://rixstep.com/2/1/20071115,00.shtml

     
  8. BlackMax macrumors 6502a

    BlackMax

    Joined:
    Jan 14, 2007
    Location:
    North Carolina
    #8
    I've read the original purpose of .DS_Store files was "to give former users of the classic Mac OS the same user experience they had in previous operating system versions" (http://www.koozie.org/2004/12/what_are_ds_sto.html).

    If this is true, it would seem that .DS_Store files have long ago served their purpose and are no longer required.

    What are the chances of seeing an updated file management application (sans .DS_Store flles) in the next version of OS X?
     

Share This Page