2 .\" Copyright (c) 1989, 1990, 1993, 1994
3 .\" The Regents of the University of California. All rights reserved.
5 .\" This code is derived from software contributed to Berkeley by
6 .\" the Institute of Electrical and Electronics Engineers, Inc.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95
46 .Op Fl H | Fl L | Fl P
53 utility modifies the file flags of the listed files
58 The options are as follows:
59 .Bl -tag -width indent
63 option is specified, symbolic links on the command line are followed.
64 (Symbolic links encountered in the tree traversal are not followed.)
69 change the mode of the link itself rather than the file to which it points.
73 option is specified, all symbolic links are followed.
77 option is specified, no symbolic links are followed.
80 Change the file flags for the file hierarchies rooted
81 in the files instead of just the files themselves.
84 The flags are specified as an octal number or a comma separated list
86 The following keywords are currently defined:
88 .Bl -tag -offset indent -width ".Cm opaque"
89 .It Cm arch , archived
90 set the archived flag (super-user only)
92 set the opaque flag (owner or super-user only)
94 set the nodump flag (owner or super-user only)
95 .It Cm sappnd , sappend
96 set the system append-only flag (super-user only)
97 .It Cm schg , schange , simmutable
98 set the system immutable flag (super-user only)
99 .It Cm sunlnk , sunlink
100 set the system undeletable flag (super-user only)
101 .It Cm uappnd , uappend
102 set the user append-only flag (owner or super-user only)
103 .It Cm uchg , uchange , uimmutable
104 set the user immutable flag (owner or super-user only)
105 .It Cm uunlnk , uunlink
106 set the user undeletable flag (owner or super-user only)
111 before or removing the letters
113 from a keyword causes the flag to be cleared.
116 .Bl -tag -offset indent -width "nouchg" -compact
118 clear the user immutable flag (owner or super-user only)
120 clear the nodump flag (owner or super-user only)
123 A few of the octal values include:
124 .Bl -tag -offset indent -width ".Li 10"
126 Clear all file flags.
153 Other combinations of keywords may be placed by using
154 the octets assigned; however, these are the most notable.
163 on a symbolic link always succeeds and has no effect.
169 options are ignored unless the
172 In addition, these options override each other and the
173 command's actions are determined by the last one specified.
175 You can use "ls -lo" to see the flags of existing files.
177 Note that the ability to change certain flags is dependent
178 on the current kernel
183 for more information on this setting.
196 command first appeared in
199 Only a limited number of utilities are
202 Some of these tools include
210 In particular a tool which is not currently