4 ms·
And on every single directory on your Mac that you visit using Finder. Not just on USB drives and network shares. MacOS has done some interesting things with e
by korginator 6y ago
And on every single directory on your Mac that you visit using Finder. Not just on USB drives and network shares.
MacOS has done some interesting things with extended attributes and other metadata, but why in God's name can't we get rid of the .DS_Store is beyond me.
Here's something even better. When copying files across to non Mac file systems, be prepared for a ton of files with names like "._.filename".
Once in a while I clean out the clutter:
$ find $DIR -type f -name .DS_Store -exec rm '{}' \;
- Anthony-G 6y agoI don’t have access to a Mac but the command should be faster if you change the semi-colon to a plus-sign: find $DIR -type f -name .DS_Store -exec rm {} + Completing the `-exec` predicate with the plus-sign results in only one fork-and-exec call to the `rm` command (as long as the number of arguments doesn’t exceed the system’s `ARG_MAX` limit), similar to how the `xargs` utility aggregates arguments into sets. This feature has been in POSIX for many years so I’m guessing it should be available with the Mac OS X version. If you install GNU find, it also includes a `-delete` action so there’s no need to even call an external command to delete files.
- jjjbokma 6y agoeven better: find has a -delete: find $DIR -type f -name .DS_Store -delete +
- js2 6y agoThe underscore files store the resource fork when copying to to a non-MacOS filesystem: https://en.wikipedia.org/wiki/Resource_fork https://en.wikipedia.org/wiki/Resource_fork https://en.wikipedia.org/wiki/AppleSingle_and_AppleDouble_formats https://en.wikipedia.org/wiki/AppleSingle_and_AppleDouble_fo...
- GekkePrutser 6y agoYou can turn it off with a simple plist setting... But then it turns it off on all drives, including ones that do have resource fork support, strange enough. There's no setting that I could find that just turns it off for network and usb drives formatted with non-Mac filesystems.