Eric Jensen wrote:

<snip>
Quick question, what is the difference of doing something like:

`find stuff | rm -rf ` and `find stuff | xargs rm -rf `?

find stuff | rm -rf -- this command will generate a list of all 'found' files and send that to STDIN of the rm command, the rm command will erase all file paths sent to it from STDIN.


find stuff | xargs rm -rf -- this command will generate a list of all 'found files and send that list to the xargs command which takes that list and runs the command
supplied with each member of the list (eg rm -rf stuff1, rm -rf stuff2)


so the biggest difference is the number of rm processes you're creating, one for the first command that deletes all the files, and one for each 'found' file with the second.

Some day this find stuff will stick around in my brain long enough for me to stop asking questions like this here. man find just ends up confusing me even more. ;) Thanks again.



-- ----- Derek Carter <[EMAIL PROTECTED]> Instructor GuruLabs <http://www.GuruLabs.com/> Your source for linux instruction.

.===================================.
| This has been a P.L.U.G. mailing. |
|      Don't Fear the Penguin.      |
|  IRC: #utah at irc.freenode.net   |
`==================================='

Reply via email to