Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Quick question: how to call a script function from "find"?

13. června 2017 22:14:32 SELČ, Per Jessen <per@xxxxxxxxxxxx> napsal:
Vojtěch Zeisek wrote:
Dne úterý 13. června 2017 9:19:25 CEST, Per Jessen napsal(a):
Carlos E. R. wrote:
I usually tend towards 'xargs' because it can be parallelised, but
in this case, I would probably do this:

/home/cer/Fusion/Videos/ -type d |\
while read d;
sudo chown cer:cer $d
chmod u+r+w+x,g+w+x,o+r-w-x,+t $d
sudo chown cer-g:cer $d

find /home/cer/Fusion/Videos/ -type d | parallel "sudo... && chmod...
&&..." This is my favorite style. :-)

I didn't known "parallel" - it has a 3000+ line man page :-)
Thanks for making me aware.

I can't live without it. :-) Check examples and some basic tutorial (sorry, I'm
on tablet now). It has similar usage as xargs and cool set of various
expansions of {xxx} (similar to find, but ritcher). It can distribute tasks
among computers over SSH. You can set number of threads to use (-j X), it can
directly read stdin or e.g. process list of various commands in txt file. And
more. :-)
Vojtěch Zeisek

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >