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)
129 .It Cm cache , ucache, snocache
130 control the data swapcache (recursive)
135 before or removing the letters
137 from a keyword causes the flag to be cleared.
140 .Bl -tag -offset indent -width "nouchg" -compact
142 clear the user immutable flag (owner or super-user only)
144 clear the nodump flag (owner or super-user only)
147 A few of the octal values include:
148 .Bl -tag -offset indent -width ".Li 10"
150 Clear all file flags.
177 Other combinations of keywords may be placed by using
178 the octets assigned; however, these are the most notable.
187 on a symbolic link always succeeds and has no effect.
193 options are ignored unless the
196 In addition, these options override each other and the
197 command's actions are determined by the last one specified.
199 You can use "ls -lo" to see the flags of existing files.
201 Note that the ability to change certain flags is dependent
202 on the current kernel
207 for more information on this setting.
211 bit may be set to enable swapcache data caching.
214 may be used to disable swapcache data caching and overrides the
217 The flag is recursive and need only be set on a top-level directory
218 to automatically apply to the entire subtree, though you may have
219 to refresh the namecache with a dummy
222 You do not have to recursive set the flag with
225 and, in fact, we do not recommend it under any circumstances.
227 If you intend to use swapcache data the
228 .Cm vm.swapcache.use_chflags
229 sysctl determines whether the chflags flags are used or not.
231 .Cm vm.swapcache.data_enable
232 is turned on, data caching is turned on globally and the
233 file flags are ignored.
234 If use_chflags is turned on along with data_enable then only
235 subtrees marked cacheable will be swapcached.
237 You would typically want to enable the cache on /usr, /home, and /bin
238 and disable it for /usr/obj.
240 This only applies to data caching. Meta-data caching is universal when
255 command first appeared in
258 Only a limited number of utilities are
261 Some of these tools include
269 In particular a tool which is not currently