help with command line deletion

David Herren david at idiomatrix.com
Tue Apr 17 02:36:32 PDT 2007


On Apr 17, 2007, at 11:15 AM, Michael Maibaum wrote:

> Assuming you want to delete files from '/' down, and not really tested
>
> first run
>
> $ find / -name '.indelible-info' -print

I had to sudo this as well for it to work, and I modified it this way:

sudo find /Volumes/Data -name '.indelible-info' > ~patxi/Desktop/ 
indel.txt

Looking at that text file, it's all just the directories I wanted to  
delete...over 16,000 of them.

>
> check that that outputs only files you want to delete
>
> then run
>
> sudo find / -name '.indelible-info' -exec rm \{\} \;

This is failing for me in my modified version:

sudo find /Volumes/Data -name '.indelible-info' -exec rm \{\} \;

It returns the "is a directory" error for all of them.

Changing it to:

sudo find /Volumes/Data -name '.indelible-info' -exec rm -R \{\} \;

returns 16k plus of this error:

rm: illegal option -- /

I think we're very close. What do you suggest I need change?


/david

--
david herren - shoreham, vt us na terra solsys orionarm

"His mother should have thrown him away and kept the stork." --- Mae  
West





More information about the MacOSX-admin mailing list