.DS_Store

Jump to navigation Jump to search
Apple Desktop Services Store
Filename extension.DS_Store
Internet media typeapplication/octet-stream
Magic number\0\0\0\1Bud1\0
Developed byApple Inc.

In the Apple macOS operating system, .DS_Store is a file that stores custom attributes of its containing folder, such as the position of icons or the choice of a background image.[1] The name is an abbreviation of Desktop Services Store,[2] reflecting its purpose. It is created and maintained by the Finder application in every folder, and has functions similar to the file desktop.ini in Microsoft Windows. Starting with a full stop (period) character, it is hidden in Finder and many Unix utilities. Its internal structure is proprietary.[3]

Purpose and location[edit]

The file .DS_Store is created in any directory (folder) accessed by the Finder application, even on remote file systems mounted from servers that share files (for example, via Server Message Block (SMB) protocol or the Apple Filing Protocol (AFP)).[4] Remote file systems, however, could be excluded by operating system settings (such as permissions). Although primarily used by the Finder, these files were envisioned as a more general-purpose store of metadata about the display options of folders, such as icon positions and view settings.[2] For example, on Mac OS X 10.4 "Tiger" and later, the ".DS_Store" files contain the Spotlight comments of the folder's files. These comments are also stored in the extended file attributes,[5] but Finder does not read those.[citation needed]

In earlier Apple operating systems, Finder applications created similar files, but at the root of the volume being accessed, including on foreign file systems, collecting all settings for all files on the volume (instead of having separate files for each respective folder).[citation needed]

Problems[edit]

The complaints of many users prompted Apple to publish means to disable the creation of these files on remotely mounted network file systems.[6] However, these instructions do not apply to local drives, including USB flash drives, although there are some workarounds.[7] Before Mac OS X 10.5, .DS_Store files were visible on remote filesystems.[8]

.DS_Store files impose additional burdens on a revision control process, inasmuch as they are frequently changed and therefore appear in commits, unless specifically excluded.[9]

.DS_Store files are included in archives, such as ZIP, created by OS X users, along with other hidden files and directories.[10][11][12]

.DS_Store files have been known to adversely affect copy operations. If multiple files are selected for file transfer, the copy operation will retroactively cancel all progress upon reaching a .DS_Store file, forcing the user to restart the copy operation from the beginning.[13][14]

In 2015, a .DS_Store file led to leakage of TCL Corporation admin portal.[15]

See also[edit]

References[edit]

  1. ^ "Removing .DS_Store files on Macintosh OS X?". Adobe.com. Adobe Systems. 24 February 2003. Archived from the original on 29 September 2006. Retrieved 29 September 2006.
  2. ^ a b Gourdol, Arno (1 October 2006). "On the origins of .DS_Store". arno.org. Retrieved 1 October 2006.
  3. ^ "File Extension .DS_STORE Information". PC.net. 2007. Retrieved 28 July 2017.
  4. ^ ".DS_Store". rixstep.com. 21 May 2003. Retrieved 29 September 2006.
  5. ^ Siracusa, John (April 2004). "Mac OS X 10.4 Tiger". Ars Technica. Condé Nast. Archived from the original on 30 June 2013. Retrieved 2013-06-28.
  6. ^ "Mac OS X v10.4 and later: How to prevent .DS_Store file creation over network connections". Support.Apple.Com. Apple Inc. 24 May 2005. Retrieved 27 July 2012.
  7. ^ "Disable .DS_Store in OS X El Capitan". pixelcog. 27 February 2016.
  8. ^ "Prevent creation of .DS_Store files in network shares". greci.cc. 12 November 2007. Archived from the original on 9 July 2015. Retrieved 12 November 2008.
  9. ^ Nielsen, Spencer (24 December 2011). "Death to .DS_Store". AorenSoftware.com. Retrieved 29 October 2012.
  10. ^ "How to compress folders on a mac without DS_Store files". The Website Dev. 6 January 2018. Archived from the original on 27 August 2018. Retrieved 27 August 2018.
  11. ^ danixd (12 October 2010). "Compressing folders on a mac, without the .DS_Store". Superuser. Stack Exchange. Retrieved 27 August 2018.
  12. ^ Bernard, John (25 May 2016). "Compress without .DS_Store and __MACOSX". Ask Different. Stack Exchange. Retrieved 27 August 2018.
  13. ^ Brandt, Gary (8 September 2012). "Why does DS_Store prevent copying?". discussions.apple.com. Retrieved 21 August 2014.
  14. ^ "ditto(1) Mac OS X Manual Page". OS X Man Pages. Apple Developer. 19 December 2008. Archived from the original on 6 May 2017.
  15. ^ "TCL某网站DS_Store文件泄露敏感信息(谨慎使用Mac系统)" [Sensitive Information Leaked on a TCL Website Due to DS_Store File (Watch Out When Using Mac)] (in Chinese). 18 May 2015. Archived from the original on 5 January 2019. Retrieved 18 January 2019.

External links[edit]