Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

filesystem limits



On Tue, Jan 11, 2005 at 06:46:51PM -0500, Gregory Boyce wrote:
> On Tue, 11 Jan 2005, Bill Holt wrote:
> 
> >woops...
> >find . -name '*' | xargs rm
> 
> Wouldn't this end up adding all of the filenames as an argument to rm, 
> hitting the same argument limitation that "rm *" would get?

xargs breaks up the command into multiple commands to keep line length
under control - that's its whole purpose for being. The alternative:

  rm `find . -name '*'`

would do exactly what you describe.

Nathan

> 
> I would normally do:
> 
> find . -name '*' -exec rm {} \;
> 
> It ends up invoking a separate rm for each file which gets around that 
> problem, although it'll probably be slower since it needs to spawn a new 
> process each time.
> 
> --
> Greg
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://olduvai.blu.org/mailman/listinfo/discuss
> 
> 




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org