Archive for November, 2009

Killing off .DS_Store files recursively

While we’re at it: Another annoyance that comes with migrating files from OS X to other OS:es are those ugly .DS_Store files that Finder persists on creating every time a directory is viewed.  Since I don’t wan’t them on my Linux machines, I’ve taken the habit of issuing this command before creating a tar archive in OS X:

for i in `find . -name "*DS_Store"`; do rm -i "$i"; done

Leave a comment »

Goodbye lousy files beginning with a dot, that keep littering my tar archives!

Apple likes to take things and do them their own way. Sometimes that’s good, sometimes not so good.

One particularly annoying example is the fact that Apple for some reason thinks it’s important to send along file metadata when creating archives designated for file systems that cannot handle this metadata. Or in plain English: Whenever you create a tar archive in OS X, it will be full of hidden files, beginning with a dot, that contains metadata about the files in the tar archive. This might be good if you unpack the files in OS X, where the metadata could automatically be restored with the files. But if you, which is very likely if you use tar in the first place, intend to unpack the archive in another unix-ish environment you will have no use of the dot files, they will only be an annoyance.

Fortunately this could all be avoided, by telling OS X that you have no interest in the metadata. This could be done by simply setting an environmental variable. To do this, issue this command in a Terminal window:

export COPYFILE_DISABLE=true

Leave a comment »

Follow

Get every new post delivered to your Inbox.

Join 110 other followers