Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Unix >> Linux >> How to make files immutable (unchangeable) in Linux

use chattr command

Usage: chattr [-RVf] [-+=AacDdeijsSu] [-v version] files...

check current setting with lsattr command

Usage: lsattr [-RVadlv] [files...]

 

Set immutable flag

# chattr +i important_file.conf

 

Unset immutable flag

# chattr -i important_file.conf

Set append only flag

# chattr +a example.txt

Unset append only flag
# chattr -a example.txt

Set recursively

# chattr -R +i myfolder

Unset recursively

# chattr -R -i myfolder

 

 

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]