Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
[opensuse] About "gnu parallel" command. [Was: Re: Quick question: how to call a script function from "find"?]
On 2017-06-14 08:24, Vojtěch Zeisek wrote:
Dne středa 14. června 2017 2:20:09 CEST, L A Walsh napsal(a):
L A Walsh wrote:
Vojtěch Zeisek wrote:
find /home/cer/Fusion/Videos/ -type d | parallel "sudo... && chmod...
&&..."
This is my favorite style. :-)

How is that different from using 'xargs -N1 -j#threads'?

oops: Make those -n1 and -P. I seem to remember arguing w/the
gnuboys about not using -j, but they usually do anything
other than what I suggest.

I'm not so familiar with xargs. 'parallel -j #' says how many of available
CPU
threads to use (otherwise Parallel uses all available CPU threads). My
'xargs'
(TW) doesn't know args '-N' and '-j', but xargs, as far as I understand,
"just" does groups of given size (length of arguments). See 'ls', 'ls |
xargs'
and 'ls | xargs 4'. It is a different task. GNU Parallel takes care about
optimal usage of given numbers of threads. xargs makes perfect sense e.g. if
I
need to delete files in directory with so many files, that expansion of 'rm
*'
would be too long argument for rm, or so. But I don't want to hitchhike the
thread. :-)

Oh, please do :-)
I'm learning. It's thread shifting, and I'm the thread initiator.

--
Cheers / Saludos,

Carlos E. R.
(from 42.2 x86_64 "Malachite" at Telcontar)

< Previous Next >
Follow Ups