We have moved to www.dataGenX.net, Keep Learning with us.

Thursday, December 06, 2012

Make a File "immutable" or "unalterable" in Nix


It cannot be changed or deleted even by root. Note this works on (ext2/ext3) filesystems.
And, yes, root can delete after it's changed back.

     As root:

       $ chattr +i filename

     And to change it back:

       $ chattr -i filename

     List attributes

       $ lsattr filename




till then.....
njoy the simplicity.......