.DS_Store
.DS_Store
.DS_Store
Where did this art come from? It seems like the cover to a tabletop wargame about the french and indian war or something.
https://amp.knowyourmeme.com/memes/white-man-has-been-here
In 2000, American painter Robert Griffing created a painting titled, Friend or Foe, wherein, two Native American hunters are examining footprints made in the snow.
Super cool, I realized I was thinking of the wargame A Few Acres Of Snow by martin wallace (the designer of the modern classics, Brass Birmingham and Brass Lancashire)
https://boardgamegeek.com/boardgame/79828/a-few-acres-of-snow
undefined
Thumbs.db
…and whoever decided a file system should be case insensitive by default, I hate you.
NTFS absolutely supports case sensitivity but, presumably for consistency with FAT and FAT32 (Windows is all about backwards compatibility), and for the sake of Average-Joe-User who's only interaction with the filesystem is opening Word and Excel docs, it doesn't by default.
All that said, it can be set on a per-directory basis: https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity
The moment when you try to rename a folder in windows from Hello to hello and it doesn't work.
What's the use case for case sensitive file names
Well an uppercase ASCII char is a different char than its lowercase counterpart. I would argue that not differentiating between them is an arbitrary rule that doesn't make any sense, and in many cases, is more computationally difficult as it involves more comparisons and string manipulations (converting everything to lower case).
And the result is that you ultimately get files with visually distinct names, that aren't actually treated as distinct, and so there is a disconnect from how we process information and how the computer is doing it.
'A' != 'a', they are just as unequal as 'a' and 'b'
Edit: I would say the use case is exactly the same as programming case sensitivity, characters have meaning and capitalizing them has intent. Casing strategies are immensely prevalent in programming and carry a lot of weight for identifying programmers' intent (properties vs backing fields as an example) similar intent can be shown with file names.
On Mac when I rename a folder from “FOO” to “foo” git sees them as the same folder so no change is committed. In JavaScript I import a file from “foo” so locally that works. Commit my code and someone else pulls in my changes on their machine. But on their machine the folder is still “FOO” so importing from “foo” doesn’t work.
Because I want to?
Suffering
honestly - while a Mac is certainly less painful to use than winshit, putting rubbish files recursively into each(!!) accessed folder, on all thumbdrives ever inserted, that's something Jobs deserves to burn in hell for.
You'd want that, but a lot of programs do that, both in Windows and Linux.
e.g. The .directory
files with the [Desktop Entry]
spec by freedesktop.org
Dolphin has the option to enable/disable the feature
FWIW Dolphin only does it if the filesystem doesn't provide a way to add that metadata directly to the directory and you change the view configuration for that directory away from your standard configuration. Which is how the standard describes to do it. (Some file managers incorrectly add those .directory files to every directory you visit.)
A mac will add a .DS_Store file to any directory just by breathing on it.
I am not familiar with MacOS, but that seems like a nightmare. What is the purpose of these files?
Every fucking folder in the file share has one of these
I saw somebody with Nintendo .DS_store as a username
'u/Nintendo 3/.DS_store'
I hope they didn’t close their account two years ago!
See also: Let's roll our own .zip implementation that only Mac can reliably read for....reasons
every time i get a zip file from a mac user it has a folder with random junk in it. what's up with that? i can open the files without it so clearly those files are unnecessary
Blue Harvest for Mac will continually clean your removable drives of these files.
This seems like a bit of a scam:
On your external drives you can prevent the creation of .DS_Store
undefined
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
If you really want to continuously delete DS_Store
from both your internal and external hard drives you can set up a cronjob:
undefined
15 1 * * * root find / -name '.DS_Store' -type f -delete
When I had a Mac, literally the first thing I did was set up a Hazel rule to delete every single .DS_Store in every folder.
Found one of these in the firmware zip file of my soundbar today.
Hmm.. Smells like a windows user aswell.. Look at that:
.desktop desktop.ini
Edit: fixed the filename
Thumbs.db
ehthumbs_vista.db
System Volume Information
... You mean desktop.ini?
Ah shit I've forgotten the ancient tablets, ill fix that thank you!
I've caught the whiff of some Linux too...
lost+found
you should do this with every one of these cases. btw, where does .Trash-1000 actually come from?
Freedesktop.org’s trash specification. It’s where files moved to trash go before being deleted when it’s emptied. The 1000 is the user id.
.Trash-999 was already taken by a metal band.
I had a long and frustrating conflict with this, on this post.
As @d_k_bo@feddit.org (An dem Punkt könnten wir auch einfach Deutsch labern) noted, it's a freedesktop.org specification.
I still stand the point that it's not very thought through (a hidden dir? Why?), and that blindly implementing it is annoying. It shouldn't be a universal standard for all systems, as it's only relevant if you use a file manager which can then use that dir as Trash dir - which I don't. That could be tested by only allowing filemanagers to create the dir, and if it doesn't exist, discard the data. That's probably how some programs work, as only Prismlauncher has created the dir.
Workaround: ln -s .Trash-1000 /dev/null
The land of the penguins
__MACOSX folders hither and yon.
I would also like a word with “bonjour” process while we’re at it.
Thought it was a virus when I first discovered it.
Isn’t bonjour the reason that devices like printers famously worked so much better on Mac than windows? I feel like I read an article about that like a decade or two ago.
no one? Ok
"Bonjour, i'm here to fuck shit up"
Idk what all it does and doesn't do, but installing it in Windows lets you find your Raspberry Pi by its ".local" hostname. I know it was originally for printers or something.
It's for local service discovery. Those services may be printers on your network, or another computer sharing music on iTunes (which is why as a Windows user you'd usually get Bonjour when installing iTunes). Or maybe it's your Raspberry Pi.
It feels iffy because it comes bundled with other software without you being asked (IIRC) and it autoruns on startup. And I mean 20 years ago when iPods were a thing and people had to use iTunes on Windows, a couple dozen megabytes of RAM really mattered too. Hell I had 512 MB back when I had an iPod (and therefore iTunes)
All i figured out for certain is that it came bundled with itunes.
Would you have felt differently if it was called Rendezvous?
Probably not. I know better then to trust the french /s
That was what caused duplicates on setting the printer as default on dad's PC. Just disable active scanning for new printers in the config. Was quite some detective work with examining the service file and recursively grepping /etc for variable names multiple times.
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
Helps a bit.
Don't forget:
undefined
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
you can also delete them recursively with
find . -name '*.DS_Store' -type f -print -delete
(adapted from this script)
Why is there a *
in front of DS_Store
?
Seems like fastly made a small mistake find . -name '.DS_Store' -type f -print -delete
would just match the exact file and is faster.
I am not exactly a programmer. What is the .DS_Store file for?
Kind of a mac's version of desktop.ini. Remembers layouts and other metadata about a folder.
It's for storing your DSs, obviously.
Not for buying new DSiware games?
I learned of those files outside the context of programming. When program or file zip packages contained these random ds store files and I looked up what they are.
Turns out, it's metadata caching for macOS. Irrelevant and does not belong into [distributed or shared] packages.
/edit: It's been a long time ago. Looking at it again, I guess it adds folder metadata, so it could be useful when distributing to other macOS. But for other OS, it's noise. Either way, usually it's not intentionally included.
Just gitignore that. Same for dot idea and whatever vscode adds, if anything
Ya, but that .idea is not inserted in eleven thousand sub folders.
It's not, but I still prefer not pushing my config on others, or others pushing theirs on me.
You can add .DS Store
in your global gitignore at ~/config/git/ignore
git add .
> git commit -m "initial"
> git push
Later when I git status
or just look at the repo online… "oh crap I let .DS_Store in didn't I…" and then I remember to set up a .gitignore and make a new commit to take out the .DS_Store and put in the .gitignore.
You probably already know this, but for those who don’t, git can globally ignore patterns. It’s the first thing I set up after logging in. Honestly wish git just shipped this way out of the box (maybe match .DS_Store by name and some magic bytes?) with a way to disable it. Just for the sake of easier onboarding
Use this so that the things you need to share do get shared.
undefined
.idea/* !.idea/codeStyles !.idea/runConfigurations .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json !.vscode/*.code-snippets
Note: I haven't checked the vs code ones in depth, the list might not be perfect.
.vscode
doesn't store cache or any trash like that, so if you're including all settings, tasks, etc, you can probably just include everything.
The only thing to keep in mind is to only add settings, extension recommendations, etc that apply to all your collaborators and aren't just personal preferences. A few good examples are formatting rules, task definitions to run the project, and linting rules that can't be defined somewhere else.
As much as they love to sue people, I don't understand why Nintendo doesn't go after Apple for trademark infringement, so that they're forced to finally come up with a better method of storing folder attributes.
Because it's not marketed as a product. Apple isn't trademarking "DS".
Stop ruining my joke.
I'm pretty sure Apple has been using those files since before Nintendo released the DS.
This is probably not a relevant counter point, just a(n un)fun fact, but Nintendo put in a patent for throwing a capture ball at monsters after Pal World was released and Pal World has to change some stuff (though I'm not sure if they're doing it to avoid going to court because they're concerned or if they're being compelled).
Linux user has been here.
How can you tell?
sniff Still smells like smug.
sniff Still smells like smug.
.Trash-1000
LF line endings.
DS DS DS D-not gonna work here anymore, anyway.
fd -HI '^\.DS_Store$' $HOME -tf -X rm -v
find . -name “.DS_Store” -type d -exec rm -rf {} + -print
That doesn't work, DS_Store
are files not directories ( you need to use -type f
).
An equivalent find
command would be:
find "$HOME" -type f -name '.DS_Store' -delete -print
find
takes a while; fd
is way, way faster, but find
is preinstalled, so there is that.