[plug] deleting files

raven at themaw.net raven at themaw.net
Tue Apr 27 18:40:49 WST 2004


On Mon, 26 Apr 2004, Jon  Miller wrote:

> I have in one directory over 1000 files that needs to be deleted.  Of course when I issue rm -rf * I get  message stating the argument list was too long.  Is there a way to issue a single command to delete the entire content of the directory?

cd <to the dir>
find . | xargs -n 50 rm -f 

cd ..
rmdir <the dir>

might do the trick.

Be careful.

If there are subdir you might like to add an r to the f above.

Ian




More information about the plug mailing list