From Wikipedia, the free encyclopedia
Jump to: navigation, search

.DS_Store (short for Desktop Services Store)[1] is a hidden file with a proprietary format created by OS X to store custom attributes of a folder such as the position of icons or the choice of a background image.[2] The Microsoft equivalent for this file is desktop.ini


Although these files were primarily used by the Finder, they were envisioned as a more general-purpose store of metadata about the display options of folders such as icon positions and view settings.[1] For example, on Mac OS X 10.4 "Tiger" and later, .DS_Store files contain the Spotlight comments of all the folder's files. (These comments are stored in the extended file attributes as well,[3] but Finder does not read those.)

By default, Finder creates a .DS_Store file in every folder that it accesses, even folders on remote systems (for example, folders shared over an SMB or AFP connection).[4] This is in contrast with the pre-existing system for the same purpose used in previous versions of the Finder, which would merely place a number of invisible files at the root of the volume being accessed (even on alien file systems), always storing the settings and metadata for all of the folders in the entire volume within this single set of files.


After complaints from users about these files being created on remote systems, Apple posted an article on its support site detailing how to disable the creation of remote .DS_Store files over network connections.[5] However, these instructions do not apply to local drives, including USB flash drives. Before Mac OS X 10.5, .DS_Store files were visible on remote filesystems.[6]

.DS_Store files impose additional burden on revision control process: They are prone to changes and therefore appear in commits unless specifically excluded.[7]

Another common issue is that .DS_Store files are included in archives (such as ZIP) created by OS X users, along with other hidden files and directories. This can potentially cause problems when the archive structure is important.

.DS_Store files have been known to adversely affect the copying of data.[8] Since these files are created by default (even in empty directories), the file may halt the transfer long after much of the data has been copied. This can be solved either by entering a terminal command to force-copy (i.e. ditto)[9] or showing hidden files and deleting the .DS_Store from either the source or the destination.

Even without overwriting data, moving the .DS_store within a copy command can interrupt and cancel a "copy task".[citation needed]

See also[edit]


  1. ^ a b Gourdol, Arno (October 1, 2006). "On the origins of .DS_Store". arno.org. Retrieved October 1, 2006. 
  2. ^ "Removing .DS_Store files on Macintosh OS X?". Adobe.com. Adobe Systems. February 24, 2003. Archived from the original on September 29, 2006. Retrieved September 29, 2006. 
  3. ^ Siracusa, John (April 2004). "Mac OS X 10.4 Tiger". Ars Technica. Condé Nast. Archived from the original on June 30, 2013. Retrieved June 28, 2013. 
  4. ^ ".DS_Store". rixstep.com. May 21, 2003. Retrieved September 29, 2006. 
  5. ^ "Mac OS X v10.4 and later: How to prevent .DS_Store file creation over network connections". Support.Apple.Com. Apple Inc. May 24, 2005. Retrieved July 27, 2012. 
  6. ^ "Prevent creation of .DS_Store files in network shares". greci.cc. November 12, 2007. Retrieved November 12, 2008. 
  7. ^ Nielsen, Spencer (December 24, 2011). "Death to .DS_Store". AorenSoftware.com. Retrieved October 29, 2012. 
  8. ^ Brandt, Gary (September 8, 2012). "Why does DS_Store prevent copying?". discussions.apple.com. Retrieved August 21, 2014. 
  9. ^ "BSD General Commands Manual". December 19, 2008. 

External links[edit]