"Steve Bertrand" <[EMAIL PROTECTED]> writes:

> I often have the need to remove hundreds or even thousands of files from a
> single directory (very often). Using rm, I usually get:
> pearl# rm -rvf *
> /bin/rm: Argument list too long.
> Is there any way to work around this instead of having to select a small
> bunch of files at a time to remove?

Not exactly, but find(1) will do the job for you.  
Typically you would use it with xargs(1).

find /path-to-directory -type f -print | xargs rm

You may need to add some options to those commands depending on your
situation.  For example, if you have embedded whitespace characters in
the file names or if you don't want to descend into subdirectories.
[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to