The letters `acdeijstuADST' select the new attributes for the files:
append only (a), compressed (c), no dump (d), extent format (e),
immutable (i), data journalling (j), secure deletion (s), no tail-merg‐
ing (t), undeletable (u), no atime updates (A), synchronous directory
updates (D), synchronous updates (S), and top of directory hierarchy
from the manpage for
Files with this flag will fail to be opened for writing. This also blocks certain potentially destructive system calls such as
$ touch foo
$ chattr +a foo
> file("foo", "w") #attempt to open for writing
[Errno 1] Operation not permitted: 'foo'
$ truncate foo --size 0
truncate: cannot open `foo' for writing: Operation not permitted
$ echo "Appending works fine." >> foo
$ cat foo
Appending works fine.
$ rm foo
rm: cannot remove `foo': Operation not permitted
$ chattr -a foo
$ rm foo
This option is designed for log files.