Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Re: Quick question: how to call a script function from "find"?
On 2017-06-13 19:32, L A Walsh wrote:
Carlos E. R. wrote:
On 2017-06-13 08:51, Bernhard Voelker wrote:

On 06/13/2017 05:38 AM, Carlos E. R. wrote:

The intention was to convert:
find /home/cer/Fusion/Videos/ -type d -exec sudo chown cer:cer
'{}' \; find /home/cer/Fusion/Videos/ -type d -exec
chmod u+r+w+x,g+w+x,o+r-w-x,+t '{}' \; find /home/cer/Fusion/Videos/
-type d -exec sudo chown cer-g:cer '{}' \; #setfacl -m u:wwwrun:rx
/data/waterhoard/Fusion.uno/Videos

I'm not sure why you would want to chown to 'cer' and later to 'cer-g'.
This looks redundant to me.


Because on a second run of the script, the chmod would error on
directories already owned by "cer-g".
not if you are running the script as root (i.e. just run chown cer-g:cer )

and I ain't :-)

That's why another line uses sudo.


Are you sure you want to give 'other' read+no execute?
Maybe you want the other way around?

No, but it doesn't matter at this point.

--
Cheers / Saludos,

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

< Previous Next >