About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Home » Learning Curve

Bride of .DS_Store

And she's an ugly dog alright - even on 10.6.1.

Get It

Try It

What's the matter with .DS_Store? asked a six year old article at this site. And if you don't feel like clicking through and reading about it, don't feel like searching this site or others, and if you still can't get a clue but desperately want one, then look at the 640+ people who've downloaded the latest contraption to get rid of it.

iRemove .DS_Store files - 1.5

They must feel there's something the matter with it.

There are three level one comments on this 'product' and all three are enlightening - inadvertently or not.

The first is by 'bousozoku'.

Uniformed developer? - Version: 1.3, 7/16/2008 07:26PM PST


I'm surprised to hear that programmers leave these files in the various folders. That's a new one for me.

It sounds as if someone doesn't much about Mac OS X and is apparently annoyed but hasn't done the research as to why Finder creates them. Hopefully, the script can't do much damage.

It shouldn't be a 'new one', bousozoku. Those critters get dropped anywhere 'TFF' goes. They shouldn't - but they do. Real programmers won't be using 'TFF' so that should give you a clue when they turn up.

And you're hoping the script can't do much damage? It shouldn't - but then again it's just a lame wrap for a simple Unix command line. The command line can't do damage but this iRemove contraption looks like it can.

The third comment is by 'gamera1' and the fright is only 2 of 6 users found it useful.

sudo find / -type f -name .DS_Store -exec rm {} \;

['gamera1' added the necessary backslash the VersionTracker engine took out in a further comment.]

And that's really the essence of it. A simple dinky Unix command line anyone should be able to type in and run. That's it. There's no more you need. You just run that command - or use the free CLIX so you don't have to worry about your feeble fingers screwing up - and they're all gone. It's that easy.

Here's some of the innards of iRemove exposed by Xstrings. All the typos are retained for your edification.

- iRemove .DS_Store files -

It appears you are running Mac OS X 10.7, and
this AppleScript has not been tested on that OS.

The .DS_Store files on all mounted disks will be
deleted from all folders and application packages.
Please wait for the confirmation dialog box.
After the Run, restarting your Mac is required.

I'll do it

sudo find / -name \.DS_Store -exec rm -fP {} \;;echo done.

All .DS_Store files have been deletec.
Restarting your Mac is required.

It appears you are running Mac OS X 10.5, and
this AppleScript has not been tested on that OS.

Note the brainiac goes through the trouble (without telling you) of purging the files - overwriting them several times with gibberish. Nonsense. Note he otherwise uses almost the exact same command line as 'gamera1' - except gamera1's is safer.

Here's the contents of the download that's only going to run that same simple command line.

13 items, 133526 bytes, 304 blocks, 96 bytes in extended attributes.

iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/AppleScripts by Tom X.webloc
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents/Info.plist
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents/MacOS
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents/MacOS/iRemove .DS_Store files
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents/PkgInfo
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents/Resources
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents/Resources/applet.icns
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents/Resources/iRemove .DS_Store files.rsrc
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents/Resources/Scripts
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/iRemove .DS_Store files.app/Contents/Resources/Scripts/main.scpt
iRemove .DS_Store files 1.4 (Tiger & Snow Leopard)/Read Me.rtf

Here's the amazing and bewildering RTF file included in the download. [Yes you the reader can read between the lines all on your own.]

But back to the product comments at VersionTracker. This one by 'rderosier'.

They always come back! - Version: 1.3, 7/16/2008 02:51PM PST


I've tried removing these .DS_Store files on different occasions and they always seem to come right back within minutes. So why bother?

Yes why bother indeed? rderosier's perception of what's going on isn't entirely accurate. They don't 'always seem' to come back. Nothing will. Some of them will come back - but only if you use 'TFF' and visit the places where you had them before.

There should never be any of these annoying files in any application bundles to start with - bousozoku was spot on. Real programmers wouldn't be using Finder anyway - and they'd make damn sure their release packages didn't have them either. After all: if Apple's developer tools specifically weed them out for 'install' builds then they definitely should be gone.

But sometimes they're not - and most of the time the reason is the 'developers' in question honestly and truly don't know how to create an 'install' build. Which should give you some indication of the level of quality you're otherwise getting.

But what are .DS_Store files good for? The name '.DS_Store' stands for 'desktop services store'. The files came about through the efforts of Arno Gourdol and his team at Apple in the late 1990s when they were tasked with writing a new Finder for that OS NeXT gave them. Third party developers definitely didn't like NeXT's File Viewer - they reportedly booed Steve Jobs when he previewed it for them - and so Arno and company went about writing a Finder that was functionally equivalent (but praise the apples had a better name).

NeXT's File Viewer was a file manager; but Apple's Finder isn't. Finder is only a way to view folders - and to arrange files and subfolders in each folder in different ways. Some people want the browser view; others want the outline view; still others want the big hairy icon view. The placement of the icons, the widths of the columns, and the view chosen are all stored so the user can get the same thing back again the next time.

But there's a twelve year bug in that code - a bug Arno finally came out and admitted to the other year. Yet despite it being around for over twelve years, it still hasn't been fixed. 'TFF' will namely drop its turds in each and every directory it touches - and not just the ones where the user changes the default configuration.

Worse still: there's still no way to turn the beast off. And it's only been a few years since it was possible to stop 'TFF' from littering up networks with the junk. And once upon a time the files contained system sensitive information that admins were unwittingly uploading to websites - talk about an easy attack vector.

You still need more info on why .DS_Store is hated? Ask any of the 640+ people who've taken the plunge to download a ridiculous app from VersionTracker.

See Also
Industry Watch: .DS_Store
Industry Watch: .DS_Insecure
Learning Curve: Zeroes Are Nice
Learning Curve: .DS_Store Redux
The Technological: Arno Lives!!1!
Coldspots: Apple! Put Back 'Put Back'
The Technological: Desktop Services Store
Security Focus: OS X .DS_Store Vulnerability
Macworld: Supercharged Mac File Manager Ships
Dealmac: AppleCore Project License: 90 Developer Tools

About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Copyright © Rixstep. All rights reserved.