[LUNI] rm help

Mike Crawford mike at tuxnami.org
Mon Jun 16 14:32:37 CDT 2003


Try:

for each in *; do
rm $each
done

dunno if the * will put too many args in here, but it's worth a shot.

mike

Ronald Petty said:
> I have a directory that has a HUGE number of files in it, so large I
> don't want to wait to find out how many.
>
> I tried
>
> rm *
>
> but it didn't work, said too many arguments.  So I tried
>
> ls | rm
>
> but it didn't work, said too few arguments
>
> I did
>
> ls | xargs rm
>
> and it worked, I assume ls | rm doesn't work because rm doesn't take
> interactive input if that makes sense.  Could someone clear this up for
> me?
>
> Thanks
> Ron
>
> ______________________________________________________________________
> Linux Users Of Northern Illinois - Technical Discussion
> luni at luni.org
> http://luni.org/mailman/listinfo/luni
>


----
Michael R. Crawford
tuxnami.org
mike at tuxnami.org


More information about the luni mailing list