sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

chmod.1 (1167B)


      1 .Dd 2015-10-08
      2 .Dt CHMOD 1
      3 .Os sbase
      4 .Sh NAME
      5 .Nm chmod
      6 .Nd change file modes
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Oo
     10 .Fl R
     11 .Op Fl H | L | P
     12 .Oc
     13 .Ar mode
     14 .Ar file ...
     15 .Sh DESCRIPTION
     16 .Nm
     17 changes the file mode of each
     18 .Ar file
     19 to
     20 .Ar mode .
     21 .Pp
     22 If
     23 .Ar mode
     24 is
     25 .Em octal
     26 "[sog]e"
     27 .Bl -tag -width Ds
     28 .It s
     29 .Xr sticky 1 => s += 1
     30 .Pp
     31 .Xr setgid 2 => s += 2
     32 .Pp
     33 .Xr setuid 4 => s += 4
     34 .It o|g|e
     35 owner | group | everyone
     36 .Pp
     37 .Xr execute 1 => o|g|e += 1
     38 .Pp
     39 .Xr write 2 => o|g|e += 2
     40 .Pp
     41 .Xr read 4 => o|g|e += 4
     42 .El
     43 .Pp
     44 Leading zeroes may be omitted.
     45 .Pp
     46 If
     47 .Ar mode
     48 is
     49 .Em symbolic
     50 "[ugoa]*[+-=][rwxst]*"
     51 .Bl -tag -width Ds
     52 .It u|g|o|a
     53 owner | group | other (non-group) | everyone
     54 .It +|-|=
     55 add | remove | set
     56 .It r|w|x|s|t
     57 read | write | execute | setuid and setgid | sticky
     58 .El
     59 .Sh OPTIONS
     60 .Bl -tag -width Ds
     61 .It Fl R
     62 Change modes recursively.
     63 .It Fl H
     64 Dereference
     65 .Ar file
     66 if it is a symbolic link.
     67 .It Fl L
     68 Dereference all symbolic links.
     69 .It Fl P
     70 Preserve symbolic links. This is the default.
     71 .El
     72 .Sh SEE ALSO
     73 .Xr chgrp 1 ,
     74 .Xr umask 1
     75 .Sh STANDARDS
     76 The
     77 .Nm
     78 utility is compliant with the
     79 .St -p1003.1-2013
     80 specification.
     81 .Pp
     82 The
     83 .Op Fl HLP
     84 flags are an extension to that specification.