Live data from Hacker News

Death to .DS_Store

aorensoftware.com

101–110 of 127 posts

Re: Death to .DS_Store

#101

Earlier quoted context omitted.

Find . -name ".DS_Store" | xargs rm Forgive if it's not exact, I'm on a mobile device. But that should save you effort.

It should work. The other way to do this is: find . -name '.DS_Store' -delete

I'm in lust with xargs

Re: Death to .DS_Store

#102

blueharvest is a pay mac os app that does this: 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).

TinkerTool 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

There 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

Re: Death to .DS_Store

#103

Earlier quoted context omitted.

It's an extreme case of what is commonly called a "first world problem".

90% of the "problems" discussed on HN can be dismissed as "first world problems," but thanks for pointing it out.

A lot, maybe, but not 90%. I think most are valid engineering problems and questions

Re: Death to .DS_Store

#104
post #90

Earlier quoted context omitted.

"Nearly all configuration files are in one of two places" That's entirely incorrect. There are many, many programs out there that do not follow the convention.

I can think of no system services that don't use /etc. As for user programs, the only real things that I can think of breaking this convention are small projects that store their configuration files with the binary; usually small programs that run from their own directory. Would you care to elaborate on where these other programs choose to store their configuration?

Not unusual for third party software to have configuration files elsewhere though. You see this a lot with "Enterprise" java stuff, typically config files in XML scattered around the installation directory.

Re: Death to .DS_Store

#105

I 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.

Its worth pointing out that this can cause issues with Xcode 4.2 as described on http://asepsis.binaryage.com/#known-issues

Re: Death to .DS_Store

#106
post #89

Earlier quoted context omitted.

> OSX - supposed to be simple to use and the defaults are supposed to "just work" and make sense to most people (drag an "icon" to the "trash" to "uninstall" it made no sense to me) Application installation is the confusing part (stupid DMGs), but what's wrong with moving something to the trash to delete it? That's what you do with files, why should applications be different? You are confused by it just because you'v…

I can go on for days on how the Windows installation process is broken (icons in the start menu, desktop, AND quick launch bar), but it can be a pleasant experience. The msi installer has the flexibility to have 0 UI screens. Just install and then exit. But the defaults are about 5 screens the user doesn't care about or want. Mac has problems too. Ive been bit by the uninstall process more than once. What does a norm…

Linux distro package management solves that, surely?

Re: Death to .DS_Store

#107
post #53

I 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 thumbn…

In 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…

> 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.

Heck, it wasn't uncommon for applications to have no data fork at all prior to the PowerPC transition. (PPC applications stored their object code in the data fork.)

Re: Death to .DS_Store

#108
post #79

I 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 thumbn…

This folder is needed to create a one-to-one mapping of file on disk with file in ZIP. The same thing happens when you put a file into FAT32 filesystem, which doesn't have support for HFS+ extended attributes. For example, if not for _MacOS folder, you wouldn't be able to store OS X aliases (not Unix symlinks but aliases) in ZIP, which use extended attributes. Other solutions are 1) use some other archive format whic…

It doesn't sound like a compromise to me. The metadata is added in a way that is useless to all unzip programs except Finder.

The compromise seems to be that they made a Mac-specific derivative zip format, but in a very non-transparent way: it will work just fine for a long time, and then suddenly it doesn't work.

If you have essential metadata (such as aliases) they will still not make it across to a Windows user, and it won't have "just worked". In that case, you'd been better served by a warning when creating the zip.

Re: Death to .DS_Store

#109
post #7

Earlier quoted context omitted.

Unix 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…

Funny, 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.

This is a good use case for "git filter-branch" and a lecture along the lines of "stop doing that".

Re: Death to .DS_Store

#110
post #79

Earlier quoted context omitted.

This folder is needed to create a one-to-one mapping of file on disk with file in ZIP. The same thing happens when you put a file into FAT32 filesystem, which doesn't have support for HFS+ extended attributes. For example, if not for _MacOS folder, you wouldn't be able to store OS X aliases (not Unix symlinks but aliases) in ZIP, which use extended attributes. Other solutions are 1) use some other archive format whic…

It doesn't sound like a compromise to me. The metadata is added in a way that is useless to all unzip programs except Finder. The compromise seems to be that they made a Mac-specific derivative zip format, but in a very non-transparent way: it will work just fine for a long time, and then suddenly it doesn't work. If you have essential metadata (such as aliases) they will still not make it across to a Windows user, a…

It's not useless to other ZIP programs: you can unzip and zip back the directory with other programs and it will work just fine. The reason? They didn't make a derivative format.

Of course OS X aliases won't work on Windows -- there's no such thing as alias on this operating system. Just like Windows won't magically set Unix permissions on files extracted from ZIP archive created in Unix format. OS X specific things will be useless on other OSes.

Post reply on HN