Friday, May 6, 2011

How to set chattr attribute on a file


The following post explains how to set ch attribute on a file.
root@me [~]# chattr +i /etc/fstab
root@me [~]# lsattr /etc/fstab
----i--A----- /etc/fstab
root@me [~]# chattr -i /etc/fstab

root@me [~]# lsattr /etc/fstab
-------A----- /etc/fstab
root@me [~]#
The letters "acdijsuADST" select the new attributes for the files: append only (a), compressed (c), no dump (d), 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)

No comments:

Post a Comment

Be nice. That's all.