TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Explainer: .DS_Store Files

136 pointsby serhack_over 3 years ago

20 comments

black_puppydogover 3 years ago
These are arguably one of the smaller annoyances about apple when not using one myself (so, always) and they have become less relevant over the last years as sharing things via USB has become less common and I don&#x27;t use dropbox or such with shared folders anymore. People who use git don&#x27;t tend to check these in, when working with me at least, I make sure of that.<p>But it&#x27;s a pretty darn good symbol for how Apple doesn&#x27;t give a flying fuck about anyone&#x27;s time&#x2F;nerves, just dumping these on everyone without asking and letting us deal with their laziness.<p>Plus, Apple <i>users</i> then typically just rolled their eyes when I point out to them that I&#x27;ve now got all these files on my USB drive, thanks for nothing Apple. &quot;Why do you even care?&quot; Yeah, why do I? There&#x27;s just no reason I should have to sort through these to keep them out of my systems, yet I don&#x27;t want them there so no I have to, thanks apple... (this was before I got good on the terminal so it was actually quite annoying)<p>Bottom line: this still gets my blood boiling. Fuck apple, they&#x27;re the new Microsoft in every way.
评论 #29367087 未加载
评论 #29367288 未加载
评论 #29368717 未加载
评论 #29367786 未加载
评论 #29367812 未加载
评论 #29367493 未加载
jeroenhdover 3 years ago
&quot;.DS_Store&quot;, or, &quot;how to tell if a ZIP file was created by a macOS user&quot;.
评论 #29366525 未加载
评论 #29365390 未加载
评论 #29368402 未加载
评论 #29365407 未加载
评论 #29367892 未加载
评论 #29369046 未加载
评论 #29368388 未加载
评论 #29364864 未加载
评论 #29364983 未加载
dangover 3 years ago
Some past related threads:<p><i>.DS_Store</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26435783" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26435783</a> - March 2021 (30 comments)<p><i>Ask HN: What are the technical justifications for keeping .DS_Store?</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23648165" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23648165</a> - June 2020 (91 comments)<p><i>.DS_Store</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20340151" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20340151</a> - July 2019 (21 comments)<p><i>Don&#x27;t commit your .DS_Store files</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17134324" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17134324</a> - May 2018 (2 comments)<p><i>.DS_Store files always hidden from Finder in macOS Sierra Beta</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12056993" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12056993</a> - July 2016 (11 comments)<p><i>.DS_Store for non-mac users</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5733022" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5733022</a> - May 2013 (15 comments)<p><i>Death to .DS_Store</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3390509" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3390509</a> - Dec 2011 (122 comments)
评论 #29365872 未加载
KingMachiavelliover 3 years ago
Since Windows and MacOS don&#x27;t seem interested in having mutually supported advanced filesystems, it would be nice if we just standardized on a flat file structure to implement portable features.<p>fat32 is very portable but has a 4GB limit and lacks entered attributes. exfat probably supports everything but until very recent open source drivers it lacked cross platform compatibility.<p>Plus too many devices are going to be limited to fat32 so we might as well just use that as a common denominator.<p>It would be nice if a DS_Store system could be used to associate split files (e.g. $NAME.1 $NAME.2, etc.) as a word around for the 4GB limit. User permission attributes and other extended attributes could be stored as well.<p>What&#x27;s interesting is that Fat32 had this feature implemented on OS&#x2F;2 and Win NT via files with the &quot;␠EA.␠SF&quot; suffix. Unfortunately looks like it was dropped in Windows 2000.
评论 #29365473 未加载
nfozover 3 years ago
So, why aren&#x27;t these just stored in a db or some other directory of the OS? Instead of littering the userspace, and no fs-ext required. Also it sounds like these should be per-user-and-dir instead of just per-directory.
评论 #29367019 未加载
评论 #29365996 未加载
评论 #29365995 未加载
rkagererover 3 years ago
Ah, .DS_Store. As a Windows user forced to endure this offensive clutter I curse the fucking bastard that came up with that.<p>No love either for the twerp who invented desktop.ini or caused thumbs.db to seemingly keep coming back after I repeatedly turn off that feature.<p>If you&#x27;re interested in such voodoo arts check out NTFS Alternate File Streams too (which while the bane of many at least have the decency not to spread to filesystems that don&#x27;t support them).
quititover 3 years ago
This wasn&#x27;t much of an explainer, it didn&#x27;t even cover all the things that .DS_Store is capable of managing. The wiki does a better job of covering the topic.<p>It&#x27;s also not something to get upset about - if .DS_Store or Apple double files (or for that matter Desktop.ini &#x2F; thumbs.db) are a surprise then it&#x27;s time to hang up one&#x27;s coat, they&#x27;re trivially revealed in the terminal and so predictable and easy to deal with that complaining about them is akin to holding up a dunce sign.<p>If one has purchased hardware&#x2F;software that can&#x27;t cope with them: get a refund, this shit is entry level basic.
评论 #29373167 未加载
praashover 3 years ago
Finally I understand the perspective of mac users in this problem. I had assumed that showing hidden files and manually cleaning up the zip archive would be a &quot;simple no-brainer solution&quot;.<p>I just can&#x27;t comprehend the reasoning of hiding .DS_Store <i>beyond</i> the reach of viewing hidden files. This is user-hostile. Why don&#x27;t the native zipping tools automatically ignore these files when creating an archive?
idle_zealotover 3 years ago
So is there a way to get my Mac to stop making these? Dragging file icons to arbitrary positions in a directory is not a feature I want.
评论 #29367212 未加载
ssss11over 3 years ago
TLDR: .DS_Store files are Desktop Services Stores, containing that folder’s custom attributes, things like icon positions, and in more recent versions of macOS custom settings for the display of file metadata. Among the most important for some users are Finder or Spotlight Comments, which are normally displayed in the Comments section of the Get Info dialog for a file.
sydthrowawayover 3 years ago
How do other OSes handle the same functionality without placing machine files in the users filesystem?
评论 #29364802 未加载
评论 #29364939 未加载
评论 #29364765 未加载
评论 #29364770 未加载
slmjkdbtlover 3 years ago
From my knowledge .DS_Store is something everyone hates and no one actually benefits from, I personally hate it with passion and there&#x27;s several times I wanted to work at Apple to remove it. Is there a reason why macOS still keeps it, do they actually think it&#x27;s a good idea, or they don&#x27;t like to listen to users, or they didn&#x27;t get to do it yet?
评论 #29367189 未加载
primitivesuaveover 3 years ago
There is an awesome Atom plugin called &quot;ds-store-delete&quot; which allows me to use ctrl-alt-x or click a bright red button in the bottom left corner to delete all .DS_Store files in a workspace.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;pedroparra&#x2F;ds-store-delete" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pedroparra&#x2F;ds-store-delete</a>
评论 #29367782 未加载
black_puppydogover 3 years ago
I just realized that once my girlfriend (against all my advice...) gets her new Mac, these fuckers will show up on our NFS server, huh?<p>Does anyone know how to prevent that from happening? It&#x27;s a non-auth NFS, so anyone on the network is supposed to see and use it. So a server-side solution would be preferable, but client-side will do in a pinch.
评论 #29367088 未加载
评论 #29389455 未加载
评论 #29368534 未加载
geraneumover 3 years ago
It makes sense to hide these files from many macOS users who don&#x27;t care about them. For developers (who should be able to work with a Terminal) there&#x27;s no need to resort to any magic or special command to make them visible! They are normal hidden files. A simple `ls -a` will list them too. You also have to put them in .gitignore as you put desktop.ini and other window managers&#x27; metadata files.<p>I wish the author explained in more technical detail or clearer how and where these files cause problems (not doubting that it does). In that case, it would have made a really useful article.
toxikover 3 years ago
Fyi, if you use netatalk to expose network file systems to macOS, you can tell it to store these things as ext4 extended attributes instead.
评论 #29389466 未加载
amaccuishover 3 years ago
The Veto Files option of Samba springs to mind
TheNewAndyover 3 years ago
How do these work with multiple users? If two users are looking at the same directory, then do they fight?
dariosalvi78over 3 years ago
More than the DS_Store files what fascinates me is that when you delete something on a USB stick it doesn&#x27;t go away, making the life of the stick limited to one write. This, unless you format it, but how many regular users understand it? The champions in usability...
ghostly_sover 3 years ago
Come on…an &quot;explainer&quot; of .DS_Store that doesn&#x27;t even mention resource forks is misinformation.
评论 #29365186 未加载
评论 #29365174 未加载