Change permissions
Giorgos Keramidas
charon at labs.gr
Sat Sep 22 16:28:01 EEST 2001
Lefteris Sidirourgos <lefteris at edu.uoc.gr> wrote:
> On Friday 21 September 2001 19:22, Giorgos Keramidas wrote:
> > Spyros Dimas <Spyros.Dimas at liaison.gr> wrote:
> > > Kalimera sas!
> > >
> > > Mipos mporei kapoios na me boithisei na liso ena problima? Esto oti
> > > yparxei enas katalogos sto linux me polous ypokatalogous kai arxeia (kai
> > > stous ypokatalogous). Pos tha mporeso me mia entoli na allakso ta
> > > permissions tous . Diladi na mporeso na allakso oti einai apokato apo
> > > auto to directori.
> >
> > % find /path/to/directory -type d | xargs chmod 755
> > % find /path/to/directory -type f | xargs chmod 644
>
> Basika ola ta parapanw ta kaneis me thn entolh
>
> chmod -X /path/to/directory -R
>
> afoy to X (kefalaio) analambanei na kanei executable mono ta arxeia poy einai
> executable kai ta directory kai oxi ola ta alla.
Unportable. Sto FreeBSD 5.0 to manpage ths find(1) leei:
-X The -X option is a modification to permit find to be safely used
in conjunction with xargs(1). If a file name contains any of the
delimiting characters used by xargs(1), a diagnostic message is
displayed on standard error, and the file is skipped. The delim-
iting characters include single (`` ' '') and double (`` " '')
quotes, backslash (``\''), space, tab and newline characters.
An ontws thes na kaneis executable mono osa htan kai prin, prepei na ftiajeis
wrapper ths chmod(1) se shell, perl, whatever, kai na kaneis kati san:
find /path | xargs chmod.wrapper MODE
alla to na ftiajeis kati pou douleuei akribos opws h chmod(1) kai den kanei
executable kati pou den einai, pera apo to oti den anafer8hke sto arxiko mail
(Pos tha mporeso me mia entoli na allakso ta permissions tous) tha xalasei ta
semantics mias entolhs opws:
find /path | xargs chmod.wrapper a+x
opou *ontws* thes na sou kanei ta arxeia executable, alla akribos epeidh
xrhsimopoieis to wrapper, den tha to kanei.
-giorgos
More information about the Linux-greek-users
mailing list