[wplug] need help with command

Mike Griffin mike at dmrnetworks.com
Thu Sep 11 14:26:11 EDT 2003


Since we're on the subject...

I've run into this problem before as well. I can't seem to remember 
exactly what I did to make it work for me (since then I've converted my 
scripts to  '-exec command {} \;'  instead of  '| xargs command'  I can 
no longer reference) but I think it worked if you  '| xargs -P0 
command'. That's a zero and not a capital "o".


Mike


On Thursday, September 11, 2003, at 02:08  PM, Mark Dalrymple wrote:

>> Don't rememember if this was the list where there was a recent
>> moderate-intensity flamewar over the use of -exec vs. xargs, so if it
>> was, please accept my apologies for beating a dead horse:
>
> it's a perfectly valid concern.  Since I'm always on my own machines,
> or hideously overpowered servers, the -exec overhead isn't bad (unix
> was designed to fork, after all).  If you're on a shared system and
> want to be a good citizen, or are on something underpowered, then
> xargs is the way to go.
>
> Folks should be aware if the command being run by xargs is sensitive
> to multiple invocations, since xargs will run a new one every couple
> hundred files.
>
> I got really burned by
>
> find . ..whatever.. | xargs tar cf ~/something-important.tar
>
> on a whole bunch of files, and the tarball only got the last couple
> hundred files from the final tar run by xargs.
>
> But stuff like grep, it's groovy.
>
> Thanks for reminding me about xargs - I forget about it :-)
> ++Mark Dalrymple, markd at badgertronics.com.  http://badgertronics.com
>   "Hitting age 50 and realizing that you've never pursued your dreams 
> is
>    one of the great horrors of the human condition. And totally
>    inexcusable. Not following your passions is the greatest sin you can
>    commit, it means surrendering the fire of your ambitions to the 
> fears
>    of other people. It's psychological treason."
>     -- jms
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>




More information about the wplug mailing list