| Apple Desktop Services Store | |
|---|---|
| Filename extension | .DS_Store |
| Internet media type | application/octet-stream |
| Magic number | \0\0\0\1Bud1\0 |
| Developed by | Apple Inc. |
.DS_Store is a file generated bymacOS that stores custom attributes of its containingfolder, such as folder view options,icon positions, and other visual information.[1] The name is an abbreviation ofDesktop Services Store,[2] reflecting its purpose. It is created and maintained by theFinder application in every folder, and has functions similar to the filedesktop.ini inMicrosoft Windows. Starting with a period. character, it ishidden in Finder and many Unix utilities. Its internal structure isproprietary,[3] but has been reverse-engineered.[4] Starting withmacOS 10.12 16A238m, Finder does not display.DS_Store files, even if enabled bydefaults write com.apple.finder AppleShowAllFiles YES in Terminal to show hidden system files.
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, viaServer Message Block (SMB) protocol or theApple Filing Protocol (AFP)).[5] Remote file systems, however, could be excluded by operatingsystem settings (such as permissions). Although primarily used by the Finder, these files were envisioned as a more general-purpose store ofmetadata about the display options of folders, such as icon positions and view settings.[2] For example, onMac OS X 10.4 "Tiger" and later, the ".DS_Store" files contain theSpotlight comments of the folder's files. These comments are also stored in theextended file attributes,[6] but Finder does not read those.[7]
In earlier Apple operating systems, Finder applications created similar files, but at the root of the volume being accessed, including on foreignfile systems, collecting all settings for all files on the volume (instead of having separate files for each respective folder).[8]
User complaints prompted Apple to publish means to disable the creation of these files on remotely mounted network file systems.[9] SincemacOS High Sierra (10.13), Apple delays the metadata gathering for .DS_Store for folders sorted alphanumerically to improve browsing speed.[10] However, these instructions do not apply to local drives, includingUSB flash drives, although there are some workarounds.[11] BeforeMac OS X 10.5, .DS_Store files were visible on remote filesystems.[12]
.DS_Store files may impose additional burdens on arevision control process, since they are frequently changed and can therefore appear in commits, unless specifically excluded.[13]
.DS_Store files are included inarchives, such asZIP, created by OS X users, along with other hidden files and directories like theAppleDouble._.[14][15][16]
.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 (duplicate) .DS_Store file, forcing the user to restart the copy operation from the beginning.[17][18]
SomeGoogle Drive users on macOS reported that .DS_Store files were being flagged forcopyright strikes. Google stated that they had addressed an issue that "impacted a small number of Drive files" to try to prevent this issue from occurring.[19]