% touch test % chattr +i test % rm test rm: cannot remove "test": Operation not permittedThe +i flag of chattr makes a file immutable. Its handy for important files.
Computer Tips - Linux: How can I make a file undeletable?
Date: 2014jun18
OS: Linux
Keywords: protect
Q. Linux: How can I make a file undeletable?
A. Use "chattr +i" like this: