14 ms·
.DS_Store is one file per directory, and it's a dotfile too so it should be hidden by default from most *nix commands.
by lilyball 5y ago
.DS_Store is one file per directory, and it's a dotfile too so it should be hidden by default from most *nix commands.
- alt227 5y agoThankyou for correcting me. I was speaking from old knowledge as this was a while ago I set this up and couldnt quite remember exactly how the .DS_store system worked. I thought it was one .ds_store file per file. That being said, depending on your business and data structure this doesnt detract from the point. Also if you have a deep nested directory structure with no real files in it, would every level contain a .ds_store file?
- amarshall 5y agoPerhaps you were thinking of AppleDouble files.
- MrDOS 5y agoThe .DS_Store file contains macOS Finder's view preferences for the directory. Finder will only write a .DS_Store file to directories where a user has actively altered their view preferences for that directory (e.g., switched from icon to list view, “cleaned up”/rearranged icons, etc.). Just navigating through the directory doesn't create a .DS_Store file.
- tjohns 5y agoThere is one .DS_Store file per directory. It contains information like window size, icon position, folder background, thumbnails, etc. Deleting/vetoing .DS_Store files will not hurt anything of substance - other than discarding user preferences. There are also AppleDouble (._) files, which are one-per-file. These contain the file's extended metadata and resource fork. Deleting these _may_ cause data loss if there's anything important stored in the resource fork. A better option is to enable vfs_streams on your Samba server to allow storing the additional forks natively on your filesystem (e.g. as xattrs). (If you're using a modern Windows file server, I believe the resource fork is automatically mapped to an NTFS alternate data stream.) See: https://www.samba.org/samba/docs/current/man-html/vfs_streams_xattr.8.html https://www.samba.org/samba/docs/current/man-html/vfs_stream... https://www.samba.org/samba/docs/current/man-html/vfs_streams_depot.8.html https://www.samba.org/samba/docs/current/man-html/vfs_stream...
- ryandrake 5y agoThere is also the (evidently dying) principle of by default wanting control over my computer and filesystem. I know this is not compelling to most people anymore but I feel like if I want 25 files in a directory, I expect to see 25 there. Not 26 because the operating system really really really really wants to pollute it with one more file. I want 25 there. If I wanted that other file there, I would have explicitly commanded my computer to put it there. I also object to my operating system running all these background processes on MY computer without me commanding it to, and it suggesting on its own that I do this or run that, again in absence of any command to do so. More and more, operating systems and applications are treating MY computer as a dumping ground and science experiment: for things it wants to do, instead of what I want it to do. I should not have to go off and find a setting somewhere just to stop my operating system from doing things on its own I don’t ask for.
- tjohns 5y agoIt's an impedance mismatch. You're moving files between a system that supports multiple streams per file (data fork + resource fork) to a system that has no concept of different streams (POSIX). The extra stream has to go somewhere, or you get data loss. It's worth noting that almost all modern file systems support multiple streams. NTFS has alternate data streams, Ext4 has xattrs. Modern SMB and NFSv4 also both support this at the protocol level. The problem arises when you're using Samba (without vfs_streams enabled), or you're writing to a legacy FAT filesystem, in which case you start getting the AppleDouble files - again, to prevent data loss.
- pixl97 5y ago>but I feel like if I want 25 files in a directory, I expect to see 25 there. What about linux that would have 27 in this case?
- kalleboo 5y agoFor plenty of users "control over my filesystem" means being able to put an icon in a certain position and have it stay there when they come back to the folder.
- kaladin-jasnah 5y agoIsn't there also the fseventsd file?