Linux file locking to chattr

1, the lock (the lock can only be read and copy operation, can not write, and move operations)

chattr  +a  ceshi.txt

2, View

lsattr  ceshi.txt

3, unlock

chattr  -a  ceshi.txt

 

Guess you like

Origin www.cnblogs.com/eternity-hu/p/11839647.html