Tuesday, July 21, 2009

Change file attribute in Linux

Hi all

Make a file readonly, ie nobody, even root, can make changes to a file:
This can be done by using the "chattr" command and "i" attribute.

[root@odcclient6 Desktop]# chattr +i test.txt

you can view the attribute of the file using this command lsattr.

To remove the attribute use this command "chattr -i"


No comments:

Post a Comment


Related Posts with Thumbnails