Main index | Section 1 | 日本語 | Options |
The options are as follows:
| |
Do not display a diagnostic message if chflags could not modify the flags for file, nor modify the exit status to reflect such failures. | |
| |
If the
| |
| |
If the file is a symbolic link, change the file flags of the link itself rather than the file to which it points. | |
| |
If the
| |
| |
If the
| |
| |
Change the file flags of the file hierarchies rooted in the files, instead of just the files themselves. Beware of unintentionally matching the " .." hard link to the parent directory when using wildcards like ".*". | |
| |
Cause
chflags
to be verbose, showing filenames as the flags are modified.
If the
| |
| |
Do not cross mount points. | |
The flags are specified as an octal number or a comma separated list of keywords. The following keywords are currently defined:
arch, archived | set the archived flag (super-user only) |
nodump | set the nodump flag (owner or super-user only) |
opaque | set the opaque flag (owner or super-user only) |
sappnd, sappend | set the system append-only flag (super-user only) |
schg, schange, simmutable | set the system immutable flag (super-user only) |
snapshot | set the snapshot flag (filesystems do not allow changing this flag) |
sunlnk, sunlink | set the system undeletable flag (super-user only) |
uappnd, uappend | set the user append-only flag (owner or super-user only) |
uarch, uarchive | set the archive flag (owner or super-user only) |
uchg, uchange, uimmutable | set the user immutable flag (owner or super-user only) |
uhidden, hidden | set the hidden file attribute (owner or super-user only) |
uoffline, offline | set the offline file attribute (owner or super-user only) |
urdonly, rdonly, readonly | set the DOS, Windows and CIFS readonly flag (owner or super-user only) |
usparse, sparse | set the sparse file attribute (owner or super-user only) |
usystem, system | set the DOS, Windows and CIFS system flag (owner or super-user only) |
ureparse, reparse | set the Windows reparse point file attribute (owner or super-user only) |
uunlnk, uunlink | set the user undeletable flag (owner or super-user only) |
Putting the letters "no" before or removing the letters "no" from a keyword causes the flag to be cleared. For example:
nouchg | clear the user immutable flag (owner or super-user only) |
dump | clear the nodump flag (owner or super-user only) |
A few of the octal values include:
0 | Clear all file flags. |
1 | Translates to the nodump keyword. |
2 | Translates to the uchg keyword. |
3 | Translates to the uchg, nodump keywords. |
4 | Translates to the uappnd keyword. |
10 | Translates to the opaque keyword. |
20 | translates to the uunlnk keyword. |
Other combinations of keywords may be placed by using the octets assigned; however, these are the most notable.
Unless the
You can use "ls -lo" to see the flags of existing files.
Note that the ability to change certain flags is dependent on the current kernel securelevel setting. See security(7) for more information on this setting.
If chflags receives a SIGINFO signal (see the status argument for stty(1)), then the current filename as well as the old and new flags are displayed.
Fl
CHFLAGS (1) | June 12, 2018 |
Main index | Section 1 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Not only is UNIX dead, it's starting to smell really bad. | ” |
— Rob Pike |