.DS_Store (short for Desktop Services Store) 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. 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. 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, 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). 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. 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.
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. 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) 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".
- Gourdol, Arno (October 1, 2006). "On the origins of .DS_Store". arno.org. Retrieved October 1, 2006.
- "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.
- 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.
- ".DS_Store". rixstep.com. May 21, 2003. Retrieved September 29, 2006.
- "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.
- "Prevent creation of .DS_Store files in network shares". greci.cc. November 12, 2007. Retrieved November 12, 2008.
- Nielsen, Spencer (December 24, 2011). "Death to .DS_Store". AorenSoftware.com. Retrieved October 29, 2012.
- Brandt, Gary (September 8, 2012). "Why does DS_Store prevent copying?". discussions.apple.com. Retrieved August 21, 2014.
- "BSD General Commands Manual". December 19, 2008.