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 .\" 3. All advertising materials mentioning features or use of this software
17 .\" must display the following acknowledgement:
18 .\" This product includes software developed by the University of
19 .\" California, Berkeley and its contributors.
20 .\" 4. Neither the name of the University nor the names of its contributors
21 .\" may be used to endorse or promote products derived from this software
22 .\" without specific prior written permission.
24 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95
37 .\" $FreeBSD: src/bin/chflags/chflags.1,v 1.30 2008/03/09 12:10:24 rwatson Exp $
38 .\" $DragonFly: src/usr.bin/chflags/chflags.1,v 1.8 2008/11/12 15:18:26 swildner Exp $
51 .Op Fl H | Fl L | Fl P
58 utility modifies the file flags of the listed files
63 The options are as follows:
64 .Bl -tag -width indent
66 Do not display a diagnostic message if
68 could not modify the flags for
70 nor modify the exit status to reflect such failures.
74 option is specified, symbolic links on the command line are followed.
75 (Symbolic links encountered in the tree traversal are not followed.)
80 change the file flags of the link itself rather than the file to which it points.
84 option is specified, all symbolic links are followed.
88 option is specified, no symbolic links are followed.
91 Change the file flags for the file hierarchies rooted
92 in the files instead of just the files themselves.
96 to be verbose, showing filenames as the flags are modified.
99 option is specified more than once, the old and new flags of the file
100 will also be printed, in octal notation.
103 The flags are specified as an octal number or a comma separated list
105 The following keywords are currently defined:
106 .Bl -tag -offset indent -width ".Cm nouhistory"
107 .It Cm arch , archived
108 set the archived flag (super-user only)
110 set the opaque flag (owner or super-user only)
112 set the nodump flag (owner or super-user only)
114 set the system nohistory flag (super-user only)
115 .It Cm nouhistory , nohistory
116 set the user nohistory flag (owner or super-user only)
117 .It Cm sappnd , sappend
118 set the system append-only flag (super-user only)
119 .It Cm schg , schange , simmutable
120 set the system immutable flag (super-user only)
121 .It Cm sunlnk , sunlink
122 set the system undeletable flag (super-user only)
123 .It Cm uappnd , uappend
124 set the user append-only flag (owner or super-user only)
125 .It Cm uchg , uchange , uimmutable
126 set the user immutable flag (owner or super-user only)
127 .It Cm uunlnk , uunlink
128 set the user undeletable flag (owner or super-user only)
133 before or removing the letters
135 from a keyword causes the flag to be cleared.
138 .Bl -tag -offset indent -width "nouchg" -compact
140 clear the user immutable flag (owner or super-user only)
142 clear the nodump flag (owner or super-user only)
145 A few of the octal values include:
146 .Bl -tag -offset indent -width ".Li 10"
148 Clear all file flags.
175 Other combinations of keywords may be placed by using
176 the octets assigned; however, these are the most notable.
185 on a symbolic link always succeeds and has no effect.
191 options are ignored unless the
194 In addition, these options override each other and the
195 command's actions are determined by the last one specified.
197 You can use "ls -lo" to see the flags of existing files.
199 Note that the ability to change certain flags is dependent
200 on the current kernel
205 for more information on this setting.
218 command first appeared in
221 Only a limited number of utilities are
224 Some of these tools include
232 In particular a tool which is not currently