ArticleslgStudy

computer science

.DS Store

.DS Store is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand .DS Store rather than just read about it. In short: .DS_Store is a file generated by macOS that stores custom attributes of its containing folder, such as folder view options, icon positions, and other visual information. The name is an abbreviation of Desktop Services Store, reflecting its purpose.

Key takeaways

  • .DS Store belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect .DS Store to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of .DS Store from memory before moving on to harder problems.

Reference excerpt

.DS_Store is a file generated by macOS that stores custom attributes of its containing folder, such as folder view options, icon positions, and other visual information. The name is an abbreviation of Desktop Services Store, 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 period . character, it is hidden in Finder and many Unix utilities. Its internal structure is proprietary, but has been reverse-engineered. Starting with macOS 10.12 16A238m, Finder does not display .DS_Store files, even if enabled by defaults write com.apple.finder AppleShowAllFiles YES in Terminal to show hidden system files.

Purpose and location 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)). 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. 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, but Finder does not read those. 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).

Problems User complaints prompted Apple to publish means to disable the creation of these files on remotely mounted network file systems. Since macOS High Sierra (10.13), Apple delays the metadata gathering for .DS_Store for folders sorted alphanumerically to improve browsing speed. However, these instructions do not apply to local drives, including USB flash drives, although there are some workarounds. Before Mac OS X 10.5, .DS_Store files were visible on remote filesystems. .DS_Store files may impose additional burdens on a revision control process, since they are frequently changed and can therefore appear in commits, unless specifically excluded. .DS_Store files are included in archives, such as ZIP, created by OS X users, along with other hidden files and directories like the AppleDouble ._. .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. Some Google Drive users on macOS reported that .DS_Store files were being flagged for copyright 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.

See also Windows thumbnail cache Desktop.ini AppleSingle and AppleDouble formats

References

External links Binary format specification from Kaitai A reverse-engineered description of the file format from Mozilla (Mark Mentovai) A more detailed description of the file format (Perl documentation by Mark Mentovai and Wim Lewis) Perl code to decode the .DS_Store format A blog post walking through parsing the .DS_Store file format

Worked examples

Example 1 — a first encounter with .DS Store

Start with the simplest possible case. Write down what .DS Store claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to .DS Store before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about .DS Store ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of .DS Store

In research
.DS Store appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses .DS Store in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
.DS Store is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer file formats, MacOS, so understanding it makes those chapters shorter.
In everyday life
Look for .DS Store outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “.DS Store” →

How to study .DS Store in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what .DS Store means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain .DS Store out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is .DS Store in simple terms?

.DS_Store is a file generated by macOS that stores custom attributes of its containing folder, such as folder view options, icon positions, and other visual information. The name is an abbreviation of Desktop Services Store, reflecting its purpose.

Why does .DS Store matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study .DS Store?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on .DS Store.

Tags

  • Computer file formats
  • MacOS

Keep exploring