Date created: 12/09/19 08:17:21. Last modified: 01/25/21 14:10:27

Set/Unset Immutable Flag

To set the immutable flag on a file on Linux, to prevent even root modification, use the chattr command:

chattr +i file.txt
chattr -i file.tx


On Mac the equivelent is:

sudo chflags -v uimmutable,simmutable file.txt
sudo chflags -v nouimmutable,nosimmutable file.txt

Previous page:
Next page: Static Routes