At 7:44 -0400 7/12/02, Erik Price wrote:
>BUT -- this is a little off topic, but could someone point me to a
>resource describing which kinds of files need the special treatment?
>I run OS X only but I have heard that there are still some apps that
>use the dichotomous file structure. This way I know what I -can't-
>preserve with a little "gnutar -czf".
Here's a quick and dirty way to find all files with resource forks,
since gnutar doesn't know from resource forks:
find [targetdir] \( -type f -and -exec test -s
\{\}\/..namedfork\/rsrc \; \) -print
Replace [targetdir] with the directory you want to search in. This
exploits the fact that you can access the resource fork of any file
by appending "/..namedfork/rsrc" to its name. A demo:
[adampb:~] adam% cd /Applications/iMovie.app/Contents/Resources/Sound\ Effects/
[adampb:Contents/Resources/Sound Effects] adam% ls -l Crickets
536 -rw-rw-r-- 1 root admin 542226 Sep 24 2001 Crickets
[adampb:Contents/Resources/Sound Effects] adam% ls -l Crickets/..namedfork/rsrc
536 -rw-rw-r-- 1 root admin 709 Sep 24 2001 Crickets/..namedfork/rsrc
.... thus the Crickets sound effect has a 542226-byte data fork and a
709-byte resource fork.
adam