- Linux Shell Scripting Cookbook(Third Edition)
- Clif Flynt Sarath Lakshman Shantanu Tushar
- 56字
- 2021-07-09 19:46:29
How to do it...
To make the files immutable, follow these steps:
- Use chattr to make a file immutable:
# chattr +i file
- The file is now immutable. Try the following command:
rm file rm: cannot remove `file': Operation not permitted
- In order to make it writable, remove the immutable attribute, as follows:
chattr -i file