Name
chflags
Synopsis
chflags [-R [-H | -L | -P]] flags file
...
Change the file flags associated with
files. The flags are additional control bits
that can be displayed by using ls
-lo
.
Options
-
-H
With
-R
, follow symbolic links on the command line. Symbolic links found during file traversal normally are not followed.-
-L
With
-R
, follow all symbolic links.-
-P
With
-R
, don’t follow any symbolic links. This is the default.-
-R
Recursive. For each file that is a directory, change the flags in the entire contained directory hierarchy. Otherwise, just changes the flags for each named file.
Flags
arch
,archived
The archived flag (privileged user only)
-
nodump
The nodump flag (owner or privileged user only)
-
opaque
The opaque flag (owner or privileged user only)
sappnd
,sappend
The system append-only flag (privileged user only)
schg
,schange
,simmutable
The system immutable flag (privileged user only)
sunlnk
,sunlink
The system undeletable flag (privileged user only)
uappnd
,uappend
The user append-only flag (owner or privileged user only)
uchg
,uchange
,uimmutable
The user immutable flag (owner or privileged user only)
uunlnk
,uunlink
The user undeletable flag (owner or privileged user only)
Put the letters
no
in front of a flag name to clear the given flag. Symbolic links don’t have flags, thus the operation always succeeds but makes no change.
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.