chmod.1 - sbase - suckless unix tools | |
git clone git://git.suckless.org/sbase | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
chmod.1 (1200B) | |
--- | |
1 .Dd December 21, 2019 | |
2 .Dt CHMOD 1 | |
3 .Os sbase | |
4 .Sh NAME | |
5 .Nm chmod | |
6 .Nd change file modes | |
7 .Sh SYNOPSIS | |
8 .Nm | |
9 .Op Fl R | |
10 .Ar mode | |
11 .Ar file ... | |
12 .Sh DESCRIPTION | |
13 .Nm | |
14 changes the file mode of each | |
15 .Ar file | |
16 to | |
17 .Ar mode . | |
18 .Pp | |
19 If | |
20 .Ar mode | |
21 is | |
22 .Em octal | |
23 "[sog]e" | |
24 .Bl -tag -width Ds | |
25 .It s | |
26 .Xr sticky 1 => s += 1 | |
27 .Pp | |
28 .Xr setgid 2 => s += 2 | |
29 .Pp | |
30 .Xr setuid 4 => s += 4 | |
31 .It o|g|e | |
32 owner | group | everyone | |
33 .Pp | |
34 .Xr execute 1 => o|g|e += 1 | |
35 .Pp | |
36 .Xr write 2 => o|g|e += 2 | |
37 .Pp | |
38 .Xr read 4 => o|g|e += 4 | |
39 .El | |
40 .Pp | |
41 Leading zeroes may be omitted. | |
42 .Pp | |
43 If | |
44 .Ar mode | |
45 is | |
46 .Em symbolic | |
47 "[ugoa]*[+-=][rwxXst]*" | |
48 .Bl -tag -width Ds | |
49 .It u|g|o|a | |
50 owner | group | other (non-group) | everyone | |
51 .It +|-|= | |
52 add | remove | set | |
53 .It r|w|x|s|t | |
54 read | write | execute | setuid and setgid | sticky | |
55 .It X | |
56 execute, if directory or at least one execute bit is already set | |
57 .El | |
58 .Pp | |
59 Symbolic links are followed if they are passed as operands, and ignored | |
60 if they are encountered during directory traversal. | |
61 .Sh OPTIONS | |
62 .Bl -tag -width Ds | |
63 .It Fl R | |
64 Change modes recursively. | |
65 .El | |
66 .Sh SEE ALSO | |
67 .Xr chgrp 1 , | |
68 .Xr umask 1 | |
69 .Sh STANDARDS | |
70 The | |
71 .Nm | |
72 utility is compliant with the | |
73 .St -p1003.1-2013 | |
74 specification. | |
75 .Pp | |
76 The | |
77 .Op Fl HLP | |
78 flags are an extension to that specification. |