Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Quick question: how to call a script function from "find"?
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Tue, 13 Jun 2017 22:14:32 +0200
  • Message-id: <ohph39$ltr$1@saturn.local.net>
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:

find /home/cer/Fusion/Videos/ -type d |\
while read d;
do
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
and-whatever-else-you-want.
done

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.


--
Per Jessen, Zürich (23.4°C)
http://www.dns24.ch/ - your free DNS host, made in Switzerland.


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

< Previous Next >