[oclug] WEIRD!!

Raj oclug at raj.homelinux.com
Fri Apr 16 15:01:29 EDT 2004


On Fri, 16 Apr 2004, Matthew Wilcox wrote:

> On Fri, Apr 16, 2004 at 02:30:48PM -0400, Jon Earle wrote:
> > Anyone have any idea what caused these things to appear?  And how can I
> > (easily) delete 270k files... rm mgetty* says the arg list is too long!
> 
> for i in mgetty*; do rm $i; done should do the trick.  it will take a while
> though.  a better alternative would probably be:
> 
> echo mgetty* | xargs rm
> 
> 

my preferred way is 

find mgetty* -exec rm {} \;

or find . -name mgetty* -exec rm {} \;

or find -name mgetty* -type f -exec rm {} \;

build to suit your platform and sensibilities! :)

'man find' for more information.  no puns on that one please :)

btw, xargs will throw the same # of arguments to rm, causing it to fail
with the same error as with rm mgetty*

cheers!
--Raj.





More information about the OCLUG mailing list