I know that root can do anything, but is there a way to at least alert root that they are about to delete a folder that perhaps shouldn't be deleted?
We keep a work directory in our
/tmp folder, and from time to time an administrator will come along and purge the
/tmp folder with roughly
sudo rm -rf *. Is there a way to give something like a prompt or alert that they are about to delete a specific folder? Something along the lines of:
The folder XXXXX is protected from deletion - do you really want to delete this folder? (y/n)
I know, the best solution is to move this folder elsewhere (the
/tmp folder is called temp for a reason after all!), but that has other problems. Hence my question.
Asking this question makes me wonder, is it bad practice to actually blindly delete all the contents of the
/tmp folder? Isn't a better approach to only delete files that are more than a certain age?