Re: newbie - questions about "rm"
- From: Sybren Stuvel <sybrenUSE@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Dec 2006 20:54:59 +0100
dave8421@xxxxxxxxxxx enlightened us with:
I've read that 'xargs' should be used with 'rm' when using a list of
files too large for 'rm' to process.
Mostly it's a limit of the shell.
I'm wondering why 'rm' doesn't just accept a list of files as a
command line argument,
It does. However, if you have a directory with 1000000 files in it,
you can't just do "rm *" do delete them all. xargs will take the
filenames from stdin and feeds them to the "rm" command in bite-size
chunks.
Also, if the output is redirected from another command, is there a
lot of overhead using a program like xargs, since it is calling the
program multiple times?
That depends on the program that's being called multiple times. I
wouldn't worry about it until you notice it becoming a problem.
Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
.
- Follow-Ups:
- Re: newbie - questions about "rm"
- From: Chris F.A. Johnson
- Re: newbie - questions about "rm"
- References:
- newbie - questions about "rm"
- From: dave8421
- newbie - questions about "rm"
- Prev by Date: Re: Printing from WinXP to Samba/Linux (Continuing from getting it to print to begin with -- lol)
- Next by Date: Re: newbie - questions about "rm"
- Previous by thread: newbie - questions about "rm"
- Next by thread: Re: newbie - questions about "rm"
- Index(es):
Relevant Pages
|