106 points · by kaptain · 6y ago · 91 comments
Off the top of my head I can think of a number of other solutions to store directory metadata: a Finder-specific database mapping values to directory paths, resource forks (ala OS 9), etc.
99% of the reason it exists is because the OS generated thumbnails. I see these in, for example, zips, that do not have images in them, and have that file.
You know what I've seen? People do `git add ` and then I find that directory in the repo. Why does git not automatically ignore that?! It's never the right option.
Anything* that pollutes directories should be absolutely verboten, its never what the user wants.Edit: The worst part is, it makes them on network shares, and on filesystems that aren't HFS. The hell, Apple?!
QuickLook thumbnails actually go in a different cache as they are dynamically generated. .DS_Store files contain things like folder layout information.
Why doesn't Git automatically ignore desktop.ini? .desktop? __pycache__? In my experience, people end up creating bespoke .gitignore files for each project and sometimes shared online, or systemwide. I don't know if Git should make it global.
I would definitely vote for a way to incorporate sane .gitignore settings per-OS or per-language, but still make it opt-in.
it fails in many teams, they do not care or a junior dev does not know. Many folks don't setup proper dotenv especially designers. Unless added to the project .gitignore file it is going to be added to the project sooner or later.
gi macos node > .gitignore
Whenever I switch computers, one of the very first things I do is copy over my bindings in CAD so that I don't have to relearn / figure them out again. I don't see why it'd be so hard to just store your own somewhere, and use it over and over again.
- Different programming languages have different files to ignore. I hop between many languages.
- It might be a bit weird for multiple repos to have the same root commits. Not sure.
In the same view options configuration window, have a checkbox option to make the configuration portable along with the files, in which case write it out to .DS_Store or a similar file, to be used as a local override à la .htaccess
Explaining this option succinctly may be a challenge but not impossible. Maybe "Save view options with folder" with a hover tooltip explaining that this would enable the view options to remain the same across user accounts and computers.
> Maybe "Save view options with folder"
I like it, it's not only 'view options' though, as you understand. Many '.DS_Store' files are already there for many folders and I have to deal with them while compare sizes etc. Right now they are copied because I do not think FM should be invasive in your data as a general principle. But some option along the lines of "Copy meta data too" I think is reasonable way to deal with them.
As mentioned by other comments, store it in a centralised cache/config/whatever for your application.
That probably is doable on modern local hardware, but on network disks, it might still be slow.
Make that an IMHO not unreasonably large 500 photos and your local disk might be slow, too.
Add a virus scanner, and 100 photos might already be annoyingly slow.
⇒ I would try to find a way to store away the checksum somewhere in the file (say in an extended attribute, as a (modification timestamp, checksum) pair)
Can I sign up to be notified when it's released? :)
It doesn’t really bother me as it is, but it’s on the less-than-perfect list.
None of your solutions preserve that backwards compatibility -- the database wouldn't because it presumably stays on your machine, and going back to resource forks wouldn't because the earlier OS releases wouldn't know about the existence of them.
https://www.reddit.com/r/kde/comments/avmsdt/dolphin_is_grea...
Synology pollutes my directory with @eaStore and @syno crap.
WHY?
I have Mac, Windows, and a Synology. I also sync this to Google Drive (using rclone) as a backup. My network shares, and Google Drive, are polluted with crap and I don't know how to fix it :(
find -delete
Might be helpful.Doesn’t mean it’s right... but this is my anecdotal experience.
Haiku does things differently, and elegantly: https://medium.com/@probonopd/my-sixth-day-with-haiku-under-...)
If a file did not have corresponding .info file it wouldn't show up in the UI (unless you selected option to show all files).
I miss Amiga :)
*/20 * * * * root find / -name ".DS_Store" -depth -exec rm {} \;And probably better to limit this to "~" rather than "/".
You can tell the OS not to create them on network mounted drives:
defaults write com.apple.desktopservices DSDontWriteNetworkStores trueAnd nitpicking, that wouldn’t be “ala OS 9”. That OS had a desktop database on each volume.
- external drives
- non hfs/apfs drives
- everywhere
Instead I will say we can have a set of critters that cull them in various interesting ways. Critters that watch filesystems for these files and remove them if they still exist an hour after creation. Or remove them all on a schedule. Or block list them via .gitignore and similar. Sync scripts that have block lists for files and folders that match names. The solutions are endless.
This isn’t only a mac thing either. Other OS create their own variations of debris.
I think the data would be just fine stored as metadata on the directory or a centralized database that wasn't persistent between computers and the disruption would be minimal. Spotlight comments, which Finder reads from DS_Store, is also written to extended attributes. It just isn't read from there. Trash stores each file's previous folder in DS_Store, which could be problematic on a different computer (and nobody would expect that to persist).
A quick google search finds several blog posts with commands to run.
Apple usually prioritizes bugs by duplicate count.