I was recently wondering how Mac OS X stores thumbnails of files. After some Googling, I found out that about "resource forks", a feature apparently unique to Apple's HFS file systems.
I don't really like the idea of having resource forks around, and I would like to be able to delete them. Is there any way to access the resource forks programmatically? Various forum posts said that to see the resource fork of a file like presentation.pdf
I should ls presentation.pdf/rsrc
, but I haven't been able to find a file like that on my system. Is this still how it works in Snow Leopard?
I am not interested in downloading or buying some tool that does this for me. I'm comfortable with the command line, and ideally I would like a command line solution, so that I can script this.
And before I actually go through with this, I guess I should ask: is there any harm in deleting the resource forks?
You ask - "is there any harm in deleting the resource forks?"
Of course there is. Those are files that someone has constructed to be a certain way, and if you delete chunks from them, whatever program is using them is not going to be happy. You should only do so in certain situations where you know what you're getting into.
For example, Text Clippings (what you get when you drag a chunk of selected text to the desktop) are stored entirely in the resource fork. The data fork is empty. This is annoying, but it's the way it is. If you delete the resource fork, there goes all your text.
A better approach might be to contact the author of whatever software is still creating resource forks and try to convince them to abandon that practice, because you like having everything in data forks.