chattr command – rarely used gem

Cool Command

Perform as root

set this bit to esnure file cannot be accessed to anyone ;even root

# chattr +i foo_file

undo the above

# chattr -i foo_file

show attributes

# lsattr foo_file
i--------  foo_file

The following bit allows only appending to a file – not changing existing content

# chattr +a foo_file

to unset execute below

# chattr -a foo_file

Leave a Reply

Your email address will not be published.

SEARCH

Categories

Get Free Shipping on Everything All Season Long
Best Buy Co, Inc.
Best Buy Co, Inc.