Commit | Line | Data |
---|---|---|
f49acbb1 | 1 | .\" Copyright (c) 1989, 1990, 1993, 1994 |
1de392d7 | 2 | .\" The Regents of the University of California. All rights reserved. |
dc986658 KM |
3 | .\" |
4 | .\" This code is derived from software contributed to Berkeley by | |
5 | .\" the Institute of Electrical and Electronics Engineers, Inc. | |
6 | .\" | |
7 | .\" %sccs.include.redist.roff% | |
8 | .\" | |
88edbcd4 | 9 | .\" @(#)chflags.1 8.3 (Berkeley) %G% |
dc986658 KM |
10 | .\" |
11 | .Dd | |
12 | .Dt CHFLAGS 1 | |
13 | .Os | |
14 | .Sh NAME | |
15 | .Nm chflags | |
16 | .Nd change file flags | |
17 | .Sh SYNOPSIS | |
18 | .Nm chflags | |
f49acbb1 KB |
19 | .Oo |
20 | .Fl R | |
21 | .Op Fl H | Fl L | Fl P | |
22 | .Oc | |
dc986658 KM |
23 | .Ar flags |
24 | .Ar file ... | |
25 | .Sh DESCRIPTION | |
26 | The | |
27 | .Nm chflags | |
28 | utility modifies the file flags of the listed files | |
29 | as specified by the | |
30 | .Ar flags | |
31 | operand. | |
32 | .Pp | |
33 | The options are as follows: | |
34 | .Bl -tag -width Ds | |
74ee26c2 | 35 | .It Fl H |
f49acbb1 KB |
36 | If the |
37 | .Fl R | |
38 | option is specified, symbolic links on the command line are followed. | |
39 | (Symbolic links encountered in the tree traversal are not followed.) | |
40 | .It Fl L | |
41 | If the | |
42 | .Fl R | |
43 | option is specified, all symbolic links are followed. | |
44 | .It Fl P | |
45 | If the | |
46 | .Fl R | |
47 | option is specified, no symbolic links are followed. | |
dc986658 | 48 | .It Fl R |
f49acbb1 KB |
49 | Change the file flags for the file hierarchies rooted |
50 | in the files instead of just the files themselves. | |
dc986658 KM |
51 | .El |
52 | .Pp | |
8a499f2f KB |
53 | Flags are a comma separated list of keywords. |
54 | The following keywords are currently defined: | |
55 | .Bd -literal -offset indent compact | |
56 | .\"arch nothing yet. | |
88edbcd4 | 57 | opaque set the opaque flag |
8a499f2f | 58 | dump set the dump flag |
b0a4b439 KM |
59 | sappnd set the system append-only flag (super-user only) |
60 | schg set the system immutable flag (super-user only) | |
61 | uappnd set the user append-only flag (owner or super-user only) | |
62 | uchg set the user immutable flag (owner or super-user only) | |
8a499f2f KB |
63 | .Ed |
64 | .Pp | |
65 | Putting the letters | |
66 | .Dq no | |
67 | before an option causes the flag to be turned off. | |
68 | For example: | |
69 | .Bd -literal -offset indent compact | |
70 | nodump the file should never be dumped | |
71 | .Ed | |
72 | .Pp | |
f49acbb1 | 73 | Symbolic links do not have flags, so unless the |
74ee26c2 | 74 | .Fl H |
f49acbb1 KB |
75 | or |
76 | .Fl L | |
77 | option is set, | |
74ee26c2 | 78 | .Nm chflags |
8a499f2f | 79 | on a symbolic link always succeeds and has no effect. |
f49acbb1 KB |
80 | The |
81 | .Fl H , | |
82 | .Fl L | |
83 | and | |
84 | .Fl P | |
85 | options are ignored unless the | |
86 | .Fl R | |
87 | option is specified. | |
88 | In addition, these options override each other and the | |
89 | command's actions are determined by the last one specified. | |
dc986658 KM |
90 | .Pp |
91 | The | |
92 | .Nm chflags | |
93 | utility exits 0 on success, and >0 if an error occurs. | |
dc986658 KM |
94 | .Sh SEE ALSO |
95 | .Xr chflags 2 , | |
96 | .Xr stat 2 , | |
0d17b9a2 KB |
97 | .Xr fts 3 , |
98 | .Xr symlink 7 |