Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Quick question: how to call a script function from "find"? - using parallel
On 2017-06-14 15:09, Vojtěch Zeisek wrote:
Dne středa 14. června 2017 14:25:59 CEST, Carlos E. R. napsal(a):
On 2017-06-14 13:53, Per Jessen wrote:
Carlos E. R. wrote:

Corrected, but still fails:

chown: cannot access '/home/cer/Fusion/Videos/Buffy,\
cazavampiros/Temporada\ 7': No such file or directory chown: cannot access
'/home/cer/Fusion/Videos/Buffy,\ cazavampiros': No such file or directory
chown: cannot access '/home/cer/Fusion/Videos/Major\ Crimes': No such file
or directory chown: cannot access '/home/cer/Fusion/Videos/Major\
Crimes/Temporada\ 5': No such file or directory ...
chown: cannot access '/home/cer/Fusion/Videos/Twin\ Peaks/Temporada\ 3': No
such file or directory /bin/bash: -c: line 0: unexpected EOF while looking
for matching `'' /bin/bash: -c: line 1: syntax error: unexpected end of
file
/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of file
chown: cannot access '/home/cer/Fusion/Videos/Warehouse\ 13': No such file

I think I have it. Because of non-standard characters in names of Your
directories You must use double quoting, i.e. ''{}'' - yes twice ' around {}.
Second, run 'sudo echo' before, because Parallel seems to be unable to prompt
for sudo password.

It seems to work with none, too. See my previous post.

Sudo is set to passwordless for these particular commands.


find /home/cer/Fusion/Videos/ -type d | parallel "sudo chown cer:cer ''{}'' &&
chmod u+r+w+x,g+w+x,o+r-w-x,+t ''{}'' && sudo chown cer-g:cer ''{}'' && sudo
setfacl -m u:wwwrun:rx ''{}'' "


cer@Isengard:~/Fusion> time ./_Cambiar_permisos_Videos

real 0m3.853s
user 0m8.988s
sys 0m1.837s
cer@Isengard:~/Fusion>

--
Cheers / Saludos,

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

< Previous Next >