7 ms·
Death to .DS_Store
- overshard 15y agoAs someone who has to deal with coworkers who keeps sending me .DS_Store files in every compressed archive, folder, and new project commit. I agree, this must die. I even have a script built around just cleaning .DS_Store from these items. This should not be something that I need...
- jws 15y agoUnix users are offended by all the useless carriage returns in HTTP too, (and heaven forbid source files) but there just has to be some tolerance if we are all to get along. You can probably augment your VFS dispatch functions to never report a .DS_Store file and to delete one and retry any time a directory remove fails and you'll never know they exist! Or you could just ignore them the way Unix users ignore carriage returns and Windows users ignore vi's tilde backup files.
- drivebyacct2 15y agoFunny, I'm on a Linux system more often than Mac or Windows and the carriage returns drive me insane. Also, because the Windows users on my team are the ones that can't manage to figure out how to get their IDE or Git to leave our line endings alone. Our least performing team member dominates our git stats because he repeatedly manages to change nearly every line of code in our project.
- dcosson 15y agoWeird, the windows git client defaults to "checkout windows line endings, commit unix line endings" or something to that effect. I do a lot of data analysis and end up transferring text files manually and having to worry about carriage returns all the time, but I've never had that problem with git. There's an easy command line utility called flip [1] that makes dealing with line endings pretty simple. But yes, it is a ridiculous thing to have to worry about. [1] https://ccrma.stanford.edu/~craig/utility/flip/flip.cpp https://ccrma.stanford.edu/~craig/utility/flip/flip.cpp
- DougBTX 15y agoI'd recommend talking to the rest of your team to work out a consensus. With git you'll need to agree on values for core.autocrlf and core.eol. Perhaps you can take advantage of the time of year to offer an olive branch?
- jrockway 15y agoThis is a good use case for "git filter-branch" and a lecture along the lines of "stop doing that".
- eslachance 15y agoThat's interesting... The PC equivalent is thumbs.db, which can be disabled through a simple OS option. One of those rare occasions where a PC is actually more user-friendly than a Mac. Oh wait, did I just open Pandora's box?
- freyrs3 15y agoSince Linux has no such construct by default. Does that make it the most user-friendly?
- wpnx 15y agono
- jacobr 15y agoKDE's Dolphin creates annoying .directory files.
- pferde 15y agoI found Krusader to be superior to Dolphin, but that's perhaps I'm used to old two-pane way of file management (Midnight Commander, Norton/Volkov Commander, Windows Commander)
- keeperofdakeys 15y agoMany programs do something similar, for example vim creates file~ as backups. Using a graphical file manager, these used to annoy me. After switching to a terminal for file management, I can easily ignore them as if they weren't there.
- wollw 15y agoWhat I ended up doing was having vim save backups and temp files to ~/.vim/backup and ~/.vim/tmp by adding this to my .vimrc: set backupdir=~/.vim/backup set directory=~/.vim/tmp Of course these can also be relative paths so you can have a project save these to a local .backup directory too if you want to keep them near the files they relate to.
- joelackner 15y agoblueharvest is a pay mac os app that does this: http://www.zeroonetwenty.com/blueharvest4/ http://www.zeroonetwenty.com/blueharvest4/ don't get me wrong, i think this needs to be fixed at a higher level to really squash the trails mac leaves on other servers (just browsing a network share leaves these behinds).
- ashcairo 15y agoTinkerTool allows you to disable the creation of those files on network drivers.. It's free too. TinkerTool.. let's you tink, without leaving a stink? http://bresink.de/osx/0TinkerTool/details.html http://bresink.de/osx/0TinkerTool/details.html
- stfn 15y agoThere is a built-in option to disable .DS_Store creation on network and removable drives. Run the following in a terminal then log out to restart your session. defaults write com.apple.desktopservices DSDontWriteNetworkStores true source: http://support.apple.com/kb/HT1629 http://support.apple.com/kb/HT1629
- alexhawket 15y agoI use TotalFinder as a finder replacement. It has a feature called "The Asepsis feature" which will redirect .DS_Store files to /usr/local/.dscache. Quite handy.
- latchkey 15y agoHoly shit, I just bought a copy of this app and I don't even care about .DS_Store files. BEST Finder improvement ever. Thanks!
- ahelwer 15y agoFrom the TotalFinder preferences menu: "The Asepsis feature has been removed from TotalFinder since version 1.3.0 If you are interested in this functionality, please check out a separate project asepsis.binaryage.com. For migration info please read asepsis.binaryage.com#migration."
- alexhawket 15y agoAhh thanks for the tip.. I didn't even realize my TotalFinder has not updated.
- Brajeshwar 15y agoTotalFinder have actually de-coupled Asepsis from it. http://asepsis.binaryage.com/ http://asepsis.binaryage.com/ is a free download.
- specialist 15y agoCame here to say this. Thanks. I love Asepsis. Those .DS_store files really bug me. Because I have to show hidden files to see Eclipse's .project and .classpath files, that means I also have to see the zillion .DS_store files. Stupid, stupid file name choices by Eclipse. (Period prefixes are default hidden on Unix, for all you Windows users.) PS- TotalFinder is great too. Big improvement. PPS- Tried TotalTerminal for a while. It's okay. iTerm2 is enough better that I switched.
- beastmcbeast 15y ago
- hwatson 15y agoGoogle Cache: http://webcache.googleusercontent.com/search?q=cache:http://www.aorensoftware.com/blog/2011/12/24/death-to-ds_store/&hl=en&strip=1 http://webcache.googleusercontent.com/search?q=cache:http://... Mirror of Google Cache: http://mirror.henriwatson.com/notmine/aorensoftware.com/deathtods_store.html http://mirror.henriwatson.com/notmine/aorensoftware.com/deat...
- deleted 15y ago[deleted]
- funkah 15y agoYeah, this is one of those annoying little dinguses that just makes OS X look crappy. In any file share or similar shared space, only one person has to browse it with a Mac to drop these little turds all over the place.
- hexley 15y agoThumbs.db
- wavephorm 15y agoJunk files like this being littered across filesystems just wreak of extremely poor software engineering. I would love to see Apple stop writing software and operating systems and just stick to hardware.
- fiblye 15y agoBut Apple doesn't actually make hardware, and their OS and hardware designs are meant to be paired together. OS X has some flaws, but I think it's better than the alternatives in the market.
- drivebyacct2 15y ago>Apple doesn't actually make hardware I don't understand this comment. Apple absolutely makes their own hardware. They pride themselves on the A4/5 series processors and took meticulous care in designing the unibody styling that their laptops have.
- sjs 15y agoNot to mention motherboards, batteries, keyboards, trackpads, and soon SSDs. But I still wouldn't want them to stop making software. I really enjoy using a lot of Apple's software and software available for their platforms.
- cwp 15y agoThey design the hardware, but they don't manufacture it.
- tszming 15y agoTo prevent .DS_Store file creation over `network connections`, there is a simple method: http://support.apple.com/kb/HT1629 http://support.apple.com/kb/HT1629
- funkah 15y ago> Disabling the creation of .DS_Store files on remote file servers can cause unexpected behavior in the Finder Not much of a solution. Also these files should not be written by default, if at all.
- sjs 15y agoFor git users: echo ".DS_Store" >> ~/.gitignore git config --global core.excludesfile ~/.gitignore If you spend many man hours dealing w/ .DS_Store files in source code repos you're doing something wrong.
- snielsen 15y agoNobody individually spends too much time on dealing with them. It the global accumulation of man hours having to deal with them that is a travesty.
- masmullin 15y agoFind . -name ".DS_Store" | xargs rm Forgive if it's not exact, I'm on a mobile device. But that should save you effort.
- jlarocco 15y agoRight, I don't think anybody is saying it's an overburdening difficulty. But it's still something, when I shouldn't have to do anything.
- dextorious 15y agoIt's an extreme case of what is commonly called a "first world problem".
- jlarocco 15y ago90% of the "problems" discussed on HN can be dismissed as "first world problems," but thanks for pointing it out.
- dextorious 15y agoA lot, maybe, but not 90%. I think most are valid engineering problems and questions
- stickfigure 15y agoWOW - the best feature here is that Total Finder enables cut-and-paste to move files! This is the one thing I have missed terribly from Windows. It boggles my mind that Apple thinks all that clicking, rearranging windows, dragging, shifting, and dropping is a sane way to move files. Intuitive yes, but more painful than typing it out at a command line. Sometimes Apple gets stuck in "make it pretty" and forgets "make it useful".
- glhaynes 15y agoLion lets you move copied files by adding option to your paste: option-command-V.
- gregschlom 15y agoWhich is the dumbest way to fix this issue: 1. You have to remember a new shortcut 2. If you forget and you paste with Cmd-V thinking that you did Cmd-X to cut, you end up copying the files, so you have to go back, re-select them, and delete them manually. I just can't possibly understand _why_ they would explicitly think: "no, let's not use the standard user interaction here".
- glhaynes 15y agoBecause in some subtle ways, it's very different from the standard user interaction — if one cuts a piece of text from a TextEdit document, that text disappears immediately. That seems undesirably unsafe in a file system explorer, though, which is why Windows doesn't delete a file that's been cut in Explorer unless and until it actually gets pasted somewhere else. This puts a burden on the user to remember that a seemingly-identical interaction works differently in Explorer than it does elsewhere in the system. Apple's way puts a burden on the user of remembering a different menu item/key combo, but doesn't break the similarity of the cut/copy/paste interactions with those in the rest of the system. They've just chosen a different set of tradeoffs than Windows did for this engineering problem.
- 15y ago
- templaedhel 15y agoI have not encountered .DS_Store files enough for them to annoy me, but the same design flaw works itself into my life almost every day, in the form of zip files. When zipping files on OSX, the common way is to right click on your directory of choice in Finder and select “Archive as…”. This creates a Zip file, with the unwanted addition of a _macosx folder. According to this [1] article, the folder is used for thumbnails, cache data, and other meta data. I have seen these folders work their way into github repos, and I am reminded of their uselessness almost every time I open a zip archive. In the past it may have been justified (to reduce cpu load generating thumbnails and cache files while unzipping), but just like .DS_Store, the time has come to abolish these folders from zip archives. [1] http://floatingsun.net/2007/02/07/whats-with-__macosx-in-zip-files/ http://floatingsun.net/2007/02/07/whats-with-__macosx-in-zip...
- maaku 15y agoIn Mac OS X you can (or could at one time) attach extra meaningful data to a file, classically known as the "Resource Fork". In the pre-OS X days applications were often bundled by placing images, audio, etc. in the application file's resource fork. I remember in the 90's finding an application that had a huge (for its day) multi-megabyte resource fork, but only a few kilobytes of program data in the data fork. That is what the "_macosx" folder contains, only these days the resource fork is only used to store cached data such as thumbnails, window positions, etc. But it didn't always use to be that way, and for compatibility's sake we're stuck :(
- keeperofdakeys 15y agoIt doesn't matter if modern programs can read _macosx, the problem is modern applications creating them. Since they store useless metadata these days, there is no reason not to stop default creation of them.
- maaku 15y agoMy point is that they sometimes do store critical file data.
- esonderegger 15y agoI'm surprised no one's chimed in to complain about AppleDouble files. I recently updated a machine that writes a lot of files to network shares to 10.7. Since 10.7 no longer supports older versions of AFP, this meant mounting those shares using smb://. All of a sudden, instead of just .DS_Store, I had a dot file for every new regular file to ignore. It's definitely time for these to go.
- Lazare 15y agoGod, those are a nightmare. And unlike DS_Store you cannot safely delete them. Some apps/formats store critical info in them. (some fonts and some fcp projects, at a minimum. Good thing we had backups.)
- seanp2k2 15y agoWhile definitely a fun read, this problem has already been solved by BlueHarvest and TinkerTool http://www.zeroonetwenty.com/blueharvest4/ http://www.zeroonetwenty.com/blueharvest4/ The first important step of developing a tool is to look around to see if there is something that you can just use or modify slightly to fit your needs.
- fauigerzigerk 15y agoUnless you want to know how stuff works.
- MattBearman 15y agoWhy did they change they article to a link to the google cache? Google has since re-cached the page, and the cache now links to itself. I was clicking on that link for hours before I realised, what a way to spend christmas.
- megablast 15y agoWell, I guess for the obvious reason that they couldn't handle the hits.
- lucaspiller 15y agoIt is a bit stupid... Surely just loading that small article WP must be thrashing their database. This works (for now): http://viewtext.org/article?url=http%3A%2F%2Fwww.aorensoftware.com%2Fblog%2F2011%2F12%2F24%2Fdeath-to-ds_store%2F&format= http://viewtext.org/article?url=http%3A%2F%2Fwww.aorensoftwa...
- falava 15y agoDisable .DS_Store for network drives: defaults write com.apple.desktopservices DSDontWriteNetworkStores true http://support.apple.com/kb/ht1629 http://support.apple.com/kb/ht1629
- philwelch 15y agoI think it's indicative of the bikeshedding tendency of HN that we've spent this whole thread bitching about the hidden .DS_Store file and none of it admiring his work hacking the Finder.
- jvc26 15y agoYeah - its easy to be distracted by the .DS_Store in and of itself. I found the method that led to him discovering the culprit fascinating!
- gregschlom 15y agoRelated: The former lead of the OS X Finder explains the origins of .DS_Store: http://arno.org/arnotify/2006/10/on-the-origins-of-ds_store/ http://arno.org/arnotify/2006/10/on-the-origins-of-ds_store/
- frou_dh 15y agoI have a LaunchAgent (~cron job) that zaps all .DS_Store files on the entire partition on a timer. I mainly did this so that Finder windows always use my default view settings. I used to be similarly annoyed by Windows Explorer taking it upon itself to use weird custom views depending on directory contents.
- svisstack 15y agowhat a stupid move with this link..... i dont belive someone could do that he pastes link to google cache because of what? pay less of traffic some amount of text? google recached this page and article can't be viewed
- gcv 15y agoPath Finder is a fantastic Finder replacement, far more powerful, and does not create .DS_Store files. Highly recommended.
- conradev 15y agoThis is a dirty hack indeed. Mac OS X really needs a stable, feature-rich code injection platform. CydiaSubstrate, where are you?
- balloot 15y agoI am a software engineer who works mainly on a Mac. I am fully aware of the existence of .DS_Store files, but it has never bothered me nearly as much as it bothers this guy. IMHO, this falls into the category of "it's much easier to criticize someone else's design decisions than to make your own." How about you build an OS over the course of 15 years and then I can pick it apart and write hyperbolic rants about all the design details that annoy me?
- sounds 15y agoI am also a software engineer who works mainly on a Mac. Whether or not I agree with his choice to disable .DS_Store (isn't that _his_ decision, and we can just leave it be?) -- I am totally amazed at his persistence, and eventual success, to implement what he wants. The level of sophistication to live-patch a framework using mach_star is far beyond your ordinary level of interaction with the O.S. Forget about the non-portability or possible breakage on an update, this is _hacking_! So I disagree with your rejoinder: how about you find a reasonably permanent solution to turning off .DS_Store?
- Someone 15y agoI more admire his balls than his sophistication. Patching out a function called 'FlushChanges' without precisely knowing what kind of changes it flushes? I wouldn't take the chance that it does, as a side effect, increase the risk of disk corruption.
- JadeNB 15y agoBut no one is asking you to take that chance. The author notes that there seem to be no ill effects; but how else can one find out, barring some sudden forthcomingness on Apple's part, than by trying, which is exactly what the author is doing—with reports (as the article says) forthcoming in case of trouble?
- deleted 15y ago[deleted]
- Malic 15y agoThis is great for an individual user but what about a whole department/company of Macs? Good karma to anyone that knows some good Samba config-fu to prohibit/direct-to-null the creation of .DS_Store files on a SMB share.