Computer Tips - How can I make a file undeletable?

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