Under GNU/Linux if you use
sudo chattr +i file
sudo chattr -i file
you can protect (and respectively remove the protection) a file against deletion even by the root account!
The parameter “-R” allows to do the same for a directory:
sudo chattr +i -R directory
sudo chattr -i -R directory
This tool seems to be installed by default in all the GNU/Linux distributions.
Good to know 🙂