Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
[opensuse] set owner + mode on dirs below a start (was Re: Quick question: how to call a script function from "find"?)
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

---
How about:

find /home/cer/Fusion/Videos/ -type d -print0 | \
sudo xargs -0 install -d -g cer -o cer-g -m u=rwx,g=rx,o=x,+t

-- 1 line to replace the above 3 finds and bet it will execute
faster than any solution so far.

Note, I guessed you meant to have 'o' with execute
(pass-through) access that allows other to access deeper
directories with read access...(?)




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

< Previous Next >
Follow Ups