Change file attributes in Linux ext2 and ext3 file systems.


chattr [ -RV ] [ -v version ] [ mode ] files...


-V verbosely displays permission changes.

-v version sets the version number of the file to version.


The attribute is defined by the mode argument and mode is of the form +-=[ASacdisu], where the + causes the specified attributes to be added to the existing attributes of the files, - causes them to be removed from the existing attributes, and = causes the file attributes to be set to only the specified attributes. The letters ASacdisu specify the attributes for the files: A means do not update atime (atime is the time when file was accessed), S means synchronous updates, a means append only, c means compressed, i means immutable (file cannot be changed), d means no dump, s means secure deletion (file contents are completely wiped out when it is deleted), and u means undeletable (file cannot be removed).