Archive

Posts Tagged ‘lsattr’

Second extended file system: File attributes explained.

January 8th, 2009 gg1 No comments





The ext2fs allows you to setup several attributes for each file or directory, each attribute modifies the behavior of a file, you can see the current attributes of a file with the lsattr command and you can change the attributes with the chattr command. For example, open a terminal window, then create a new “test” directory:

How to make a file unchangeable or unalterable (only for ext2/ext3 file systems)

December 25th, 2008 admin No comments

If you have a file that you want nobody can change it, you shall type the following command into a shell

# sudo chattr +i filename

You can check the attributes using the following command:

# lsattr

----i------------- ./gg1.txt