1.\" Copyright (c) 1989, 1990 The Regents of the University of California. 2.\" All rights reserved. 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.\" 9.\" @(#)chflags.1 5.4 (Berkeley) 07/27/92 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 19.Op Fl HRh 20.Ar flags 21.Ar file ... 22.Sh DESCRIPTION 23The 24.Nm chflags 25utility modifies the file flags of the listed files 26as specified by the 27.Ar flags 28operand. 29.Pp 30The options are as follows: 31.Bl -tag -width Ds 32.It Fl H 33When encountering a symbolic link on the command line, follow it. All other 34symbolic links encountered in the traversal are not followed. 35.It Fl R 36Traverse a file hierarchy. 37For each file that is of type directory, 38.Nm chflags 39changes the flags of all files in the file hierarchy below it followed 40by the flags of the directory itself. 41.It Fl h 42When encountering a symbolic link anywhere in the traversal, follow it. 43.El 44.Pp 45The flags of a symbolic link are immutable, so that unless the 46.Fl h 47or 48.Fl H 49flags are set, 50.Nm chflags 51on a symbolic link is a no-op. 52.Pp 53Only the owner of a file or the super-user is permitted to change 54the low 16-bits in the flags of a file. 55Only the the super-user is permitted to change 56the high 16-bits in the flags of a file. 57.Pp 58The 59.Nm chflags 60utility exits 0 on success, and >0 if an error occurs. 61.Sh FLAGS 62Flags may be absolute or symbolic. 63An absolute flag is an octal number constructed by 64.Ar or'ing 65the following values: 66.Pp 67.Bl -tag -width 6n -compact -offset indent 68.It Li 1 69the file should never be dumped 70.El 71.Pp 72The symbolic flags is a comma separated list of keywords. 73The following keywords are defined: 74.Bd -literal -offset indent 75dump cause the file to be dumped when it is next modified 76.Ed 77.Pp 78Putting the word ``no'' before an option causes it to be deleted. 79For example: 80.Bd -literal -offset indent 81nodump the file should never be dumped 82.Ed 83.Sh SEE ALSO 84.Xr chflags 2 , 85.Xr stat 2 , 86.Xr fts 3 , 87.Xr symlink 7 88