19ddb49cbSWarner Losh.\"- 29b50d902SRodney W. Grimes.\" Copyright (c) 1989, 1990, 1993, 1994 39b50d902SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 49b50d902SRodney W. Grimes.\" 59b50d902SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by 69b50d902SRodney W. Grimes.\" the Institute of Electrical and Electronics Engineers, Inc. 79b50d902SRodney W. Grimes.\" 89b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 99b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions 109b50d902SRodney W. Grimes.\" are met: 119b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 129b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 139b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 149b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 159b50d902SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 169b50d902SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 179b50d902SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 189b50d902SRodney W. Grimes.\" without specific prior written permission. 199b50d902SRodney W. Grimes.\" 209b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 219b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 229b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 239b50d902SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 249b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 259b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 269b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 279b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 289b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 299b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 309b50d902SRodney W. Grimes.\" SUCH DAMAGE. 319b50d902SRodney W. Grimes.\" 3215856298SBruce Evans.\" @(#)chflags.1 8.4 (Berkeley) 5/2/95 33c3aac50fSPeter Wemm.\" $FreeBSD$ 349b50d902SRodney W. Grimes.\" 35b289f982SRuslan Ermilov.Dd March 24, 2003 369b50d902SRodney W. Grimes.Dt CHFLAGS 1 379b50d902SRodney W. Grimes.Os 389b50d902SRodney W. Grimes.Sh NAME 399b50d902SRodney W. Grimes.Nm chflags 409b50d902SRodney W. Grimes.Nd change file flags 419b50d902SRodney W. Grimes.Sh SYNOPSIS 428fe908efSRuslan Ermilov.Nm 439b50d902SRodney W. Grimes.Oo 449b50d902SRodney W. Grimes.Fl R 459b50d902SRodney W. Grimes.Op Fl H | Fl L | Fl P 469b50d902SRodney W. Grimes.Oc 479b50d902SRodney W. Grimes.Ar flags 48dd562b0eSPhilippe Charnier.Ar 499b50d902SRodney W. Grimes.Sh DESCRIPTION 509b50d902SRodney W. GrimesThe 51dd562b0eSPhilippe Charnier.Nm 529b50d902SRodney W. Grimesutility modifies the file flags of the listed files 539b50d902SRodney W. Grimesas specified by the 549b50d902SRodney W. Grimes.Ar flags 559b50d902SRodney W. Grimesoperand. 569b50d902SRodney W. Grimes.Pp 579b50d902SRodney W. GrimesThe options are as follows: 58dd562b0eSPhilippe Charnier.Bl -tag -width indent 599b50d902SRodney W. Grimes.It Fl H 609b50d902SRodney W. GrimesIf the 619b50d902SRodney W. Grimes.Fl R 629b50d902SRodney W. Grimesoption is specified, symbolic links on the command line are followed. 639b50d902SRodney W. Grimes(Symbolic links encountered in the tree traversal are not followed.) 649b50d902SRodney W. Grimes.It Fl L 659b50d902SRodney W. GrimesIf the 669b50d902SRodney W. Grimes.Fl R 679b50d902SRodney W. Grimesoption is specified, all symbolic links are followed. 689b50d902SRodney W. Grimes.It Fl P 699b50d902SRodney W. GrimesIf the 709b50d902SRodney W. Grimes.Fl R 719b50d902SRodney W. Grimesoption is specified, no symbolic links are followed. 7295a09b05SRuslan ErmilovThis is the default. 739b50d902SRodney W. Grimes.It Fl R 749b50d902SRodney W. GrimesChange the file flags for the file hierarchies rooted 759b50d902SRodney W. Grimesin the files instead of just the files themselves. 769b50d902SRodney W. Grimes.El 779b50d902SRodney W. Grimes.Pp 78ec9247d5SJohn PolstraThe flags are specified as an octal number or a comma separated list 79ec9247d5SJohn Polstraof keywords. 809b50d902SRodney W. GrimesThe following keywords are currently defined: 819b88faecSRuslan Ermilov.Pp 82fc6db5e3SGiorgos Keramidas.Bl -tag -offset indent -width ".Ar opaque" 83fc6db5e3SGiorgos Keramidas.It Ar arch , archived 849b88faecSRuslan Ermilovset the archived flag (super-user only) 859b88faecSRuslan Ermilov.It Ar opaque 869b88faecSRuslan Ermilovset the opaque flag (owner or super-user only) 879b88faecSRuslan Ermilov.It Ar nodump 889b88faecSRuslan Ermilovset the nodump flag (owner or super-user only) 89fc6db5e3SGiorgos Keramidas.It Ar sappnd , sappend 909b88faecSRuslan Ermilovset the system append-only flag (super-user only) 91fc6db5e3SGiorgos Keramidas.It Ar schg , schange , simmutable 929b88faecSRuslan Ermilovset the system immutable flag (super-user only) 93fc6db5e3SGiorgos Keramidas.It Ar sunlnk , sunlink 949b88faecSRuslan Ermilovset the system undeletable flag (super-user only) 95fc6db5e3SGiorgos Keramidas.It Ar uappnd , uappend 969b88faecSRuslan Ermilovset the user append-only flag (owner or super-user only) 97fc6db5e3SGiorgos Keramidas.It Ar uchg , uchange , uimmutable 989b88faecSRuslan Ermilovset the user immutable flag (owner or super-user only) 99fc6db5e3SGiorgos Keramidas.It Ar uunlnk , uunlink 1009b88faecSRuslan Ermilovset the user undeletable flag (owner or super-user only) 1019b88faecSRuslan Ermilov.El 1029b50d902SRodney W. Grimes.Pp 1039b50d902SRodney W. GrimesPutting the letters 1049b88faecSRuslan Ermilov.Dq Ar no 105ab46875aSJohan Karlssonbefore or removing the letters 106ab46875aSJohan Karlsson.Dq Ar no 107ab46875aSJohan Karlssonfrom a keyword causes the flag to be cleared. 1089b50d902SRodney W. GrimesFor example: 109ab46875aSJohan Karlsson.Pp 110ab46875aSJohan Karlsson.Bl -tag -offset indent -width "nouchg" -compact 1119b88faecSRuslan Ermilov.It Ar nouchg 112ab46875aSJohan Karlssonclear the user immutable flag (owner or super-user only) 113ab46875aSJohan Karlsson.It Ar dump 114ab46875aSJohan Karlssonclear the nodump flag (owner or super-user only) 1159b88faecSRuslan Ermilov.El 1169b50d902SRodney W. Grimes.Pp 1179b50d902SRodney W. GrimesSymbolic links do not have flags, so unless the 1189b50d902SRodney W. Grimes.Fl H 1199b50d902SRodney W. Grimesor 1209b50d902SRodney W. Grimes.Fl L 1219b50d902SRodney W. Grimesoption is set, 122dd562b0eSPhilippe Charnier.Nm 1239b50d902SRodney W. Grimeson a symbolic link always succeeds and has no effect. 1249b50d902SRodney W. GrimesThe 1259b50d902SRodney W. Grimes.Fl H , 1269b50d902SRodney W. Grimes.Fl L 1279b50d902SRodney W. Grimesand 1289b50d902SRodney W. Grimes.Fl P 1299b50d902SRodney W. Grimesoptions are ignored unless the 1309b50d902SRodney W. Grimes.Fl R 1319b50d902SRodney W. Grimesoption is specified. 1329b50d902SRodney W. GrimesIn addition, these options override each other and the 1339b50d902SRodney W. Grimescommand's actions are determined by the last one specified. 1349b50d902SRodney W. Grimes.Pp 135601fc2b9SPhilippe CharnierYou can use "ls -lo" to see the flags of existing files. 136dd562b0eSPhilippe Charnier.Sh DIAGNOSTICS 137d628d776SRuslan Ermilov.Ex -std 1389b50d902SRodney W. Grimes.Sh SEE ALSO 139601fc2b9SPhilippe Charnier.Xr ls 1 , 1409b50d902SRodney W. Grimes.Xr chflags 2 , 1419b50d902SRodney W. Grimes.Xr stat 2 , 1429b50d902SRodney W. Grimes.Xr fts 3 , 1439b50d902SRodney W. Grimes.Xr symlink 7 144995369a6SDavid E. O'Brien.Sh HISTORY 145995369a6SDavid E. O'BrienThe 146dd562b0eSPhilippe Charnier.Nm 147c8da9b75SMike Pritchardcommand first appeared in 148c8da9b75SMike Pritchard.Bx 4.4 . 149