recursive resource fork delete?

zozo
Posted:
in macOS edited January 2014
I have my entire Pictures folder that has something like 300 folders (some nested within others) and about 10,000 images many with thumbnail previews (I don't use iPhoto for my picture management, I keep em old school). Given that the thumbnail icon preview functionality is lightning fast in Tiger, I can save a lot of space and kill off the resource forks of the thumbnails. I have a wonderful Contextual Menu (Grim Ripper) that deletes them, but doesn't do recursive delete.



Is there a way to kill the resource forks of all the files contained within a folder and subfolders through terminal or other?



Thanks

Comments

  • Reply 1 of 4
    curiousuburbcuriousuburb Posts: 3,325member
    <* debates providing potentially dangerous information *>



    The "rm" command from terminal will kill files. Short for 'remove'.



    Type "man rm" in terminal for manual page descriptions on the rm command, including recursive flags.

    RTFM before you try anything.



    ** Be extremely careful using wildcards with the RM command. **



    Unix deletetion tends to be unrecoverable and you could accidentally wipe too much quite easily if you mistype the wildcards for recursive deletion. Be extra cautious.



    Double and triple check your file paths before you hit return.



    USE AT YOUR OWN RISK. (Not for newbies).



    I would be much more comfortable endorsing a more thorough search for iPhoto scripts,

    since I suspect similar code is being called to clean the iPhoto library for CD backup/transfer.



    That, or a feature request email to the Grim Ripper creators.



  • Reply 2 of 4
    dobbydobby Posts: 797member
    You could try something like

    $ cd /directory_you_want to start at

    $ find . -name '*/rsrc' -exec cp /dev/null {} \\;



    I don't have a mac handy at the moment so you might want to create a dir with a could of test files and try this.

    If the files remain but no preview then successful.



    BTW the /rsrc is the resource for for a file.



    Dobby



    Edit. changed /dev/num to /dev/null
  • Reply 3 of 4
    sladuuchsladuuch Posts: 67member
    Could you use Automator to search and destroy those resource forks? Might be the first time anyone's used the thing.
  • Reply 4 of 4
    you could copy the tree with a command line tool that won't touch resource forks - this would let you test all was good before deleting the originals, too!



    ditto --norsrc, or rsync without the -E switch should do it.
Sign In or Register to comment.