/*
Name
chattr - change file attributes on a Linux file system
Synopsis
chattr [ mode ] files…
Description
chattr changes the file attributes on a Linux file system. The format
of a symbolic mode is ±=[acdeijstuADST].
The operator ‘+’ causes the selected attributes to be added to the
existing attributes of the files; ‘-’ causes them to be removed; and
‘=’ causes them to be the only attributes that the files have.
The letters ‘acdeijstuADST’ select the new attributes for the files:
append only (a), compressed ©, no dump (d), extent format (e),
immutable (i), data journalling (j), secure deletion (s), no
tail-merging (t), undeletable (u), no atime updates (A), synchronous
directory updates (D), synchronous updates (S), and top of directory
hierarchy (T).
The following attributes are read-only, and may be listed by lsattr(1)
but not modified by chattr: huge file (h), compression error (E),
indexed directory (I), compression raw access (X), and compressed
dirty file (Z).
Attributes
When a file with the ‘A’ attribute set is accessed, its atime record
is not modified. This avoids a certain amount of disk I/O for laptop
systems. A file with the ‘a’ attribute set can only be open in append
mode for writing. Only the superuser or a process possessing the
CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
A file with the ‘c’ attribute set is automatically compressed on the
disk by the kernel. A read from this file returns uncompressed data. A
write to this file compresses data before storing them on the
disk. Note: please make sure to read the bugs and limitations section
at the end of this document.
When a directory with the ‘D’ attribute set is modified, the changes
are written synchronously on the disk; this is equivalent to the
‘dirsync’ mount option applied to a subset of the files.
A file with the ‘d’ attribute set is not candidate for backup when the
dump(8) program is run.
The ‘E’ attribute is used by the experimental compression patches to
indicate that a compressed file has a compression error. It may not be
set or reset using chattr(1), although it can be displayed by
lsattr(1).
The ‘e’ attribute indicates that the file is using extents for mapping
the blocks on disk. It may not be remove