Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is there a way (eg. a binary hack into Finder) to stop it from creating .DS-Stores on LOCAL Volumes?

I am using Leopard, therefore these don't work:

Also, BlueHarvest slows down my computer.

share|improve this question

migrated from superuser.com Nov 26 '11 at 15:38

This question came from our site for computer enthusiasts and power users.

1  
See: Prevent MacOS from making .* and ._* files — any specific reason why you don't want these? –  slhck Nov 15 '11 at 14:36
    
@slhck: blueharvest works, but slows down my computer. I am looking for something like this –  kinokijuf Nov 15 '11 at 17:19
    
I forgot that TotalFinder only works on ≥ 10.6, sorry. –  slhck Nov 15 '11 at 17:25
    
This question would be too localized if it was specific to Leopard and earlier. Answers could just mention the current lowest or highest supported version where applicable. –  Lri Nov 16 '11 at 0:11
    
add comment

3 Answers 3

up vote 2 down vote accepted

Third party solutions

In my experience, BlueHarvest is best in class. Technically, it is not an answer to the question; it can remove but not prevent .DS_Store files.

If BlueHarvest is effective but does not suit your use case, it becomes difficult to give an acceptable answer to your question.

If you have no acceptable third party solution, then you must work with what's integral to Leopard …

Without a third party solution: restrain your use of Finder

By avoiding the views that you do not wish to save, you can prevent creation of .DS_Store files.

Most users will find it difficult to restrain themselves in this way, but it's a true answer within the limitations of the question.

http://diigo.com/0qiwp for an annotated view of http://lists.apple.com/archives/applescript-users/2006/Jun/msg00180.html where Matt Deatherage (a former engineer at Apple) explains .DS_Store and other types of file.

share|improve this answer
add comment

I haven't found any way to keep them from being created, but you can delete them automatically with a script

#!/bin/sh

find ~ -name .DS_Store -exec /bin/rm -f -- {} \;`

exit 0

Run it every X minutes via launchd or cron. It takes almost no time to run on my several-year-old iMac. It will only search your $HOME (~) but that's where most of them will be. Change ~ to / if you want to catch them all, but that will take much longer to run, so adjust the frequency accordingly.

share|improve this answer
1  
You could also use find ~ -name .DS_Store -delete. And don't forget the -name flag — without it the command would apply to all files in ~ and ./.DS_Store. –  Lri Nov 27 '11 at 0:50
1  
I know that I can use a script, but your answer doesn't answer he question. –  kinokijuf Nov 27 '11 at 11:29
    
The answer to the question is "no." There isn't a way to stop them from being created (except on network shares, which also wasn't the question). This answer tries to achieve the same end result. If SE had a category of reply called "Workaround" I would have put it under that. It's certainly no worse of an "answer" than a daemon attaching to a framework (<asepsis.binaryage.com/>), and much safer than hacking into a system binary, and it runs on any version of Mac OS X. –  TJ Luoma Nov 29 '11 at 19:56
    
Except it doesn't achieve the same end result. Blueharvest is a better workaround (same end result, save for the fact that the computer runs loke a hog). Also asepsis is a driver IIRC. –  kinokijuf Nov 30 '11 at 12:49
    
a) I said "tries to achieve the same end result," namely, not having .DS_Store files on your computer. b) "Better" is a relative term, since slowing down the entire operation of the computer is a significant drawback. c) asepsis is "a kernel extension and an user-space system-wide daemon" and gets "loaded into every launching process" which is fairly close to what I said. You seem much more interested in telling me I'm wrong than accepting help, so I will stop offering it. –  TJ Luoma Dec 1 '11 at 14:06
show 2 more comments

Try this command: defaults write com.apple.desktopservices DSDontWriteNetworkStores true in terminal. It seems to work for me.

share|improve this answer
3  
It works only for network, not for local volumes. –  kinokijuf Nov 15 '11 at 14:20
    
You are correct. I apologize for my confusion. –  Siriss Nov 15 '11 at 19:03
4  
This is the only real case in which i could see .DS_Stores being annoying. They're hidden on Mac OS by default, and are crucial for saving view settings for individual folders –  XAleXOwnZX Nov 26 '11 at 23:24
1  
But I don't want to save view settings. –  kinokijuf Nov 27 '11 at 9:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.