GNU/Linux Command – CHATTR

chattr — Change File Attributes on a Ext2 File System.

Summary:

Ext2 File System(FS) is providing few extra bit to set some special attribute to each file in the FS. ‘chattr’ command is used to changes the file’s special attributes on a Ext2 FS.

Examples:
$ chattr +A myFile -- Don't change the Access time of this file. $ chattr -V +A myFile -- Same as above. But show verbose output. $ chattr +c myFile -- Save the file in compressed mode. # chattr +i myFile -- Make the file as Read-Only. $ chattr +s myFile -- Mark the file as secrete. During deletionits blocks are Zeroed. $ chattr +u myFile -- Mark for undeletion. If this file is deleted,user can ask for undelete. $ chattr +S myFile -- The changes in the file are written synchronously on the disk. # chattr -i myFile -- Remove the Read-Only Mark. $ chattr =Ac myFile -- Set only A & c bit. Clear all other bits.
Read: man chattr

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: