It is very much possible that we delete some useful files by “rm –rf” or rm, One can make use of “alias “command to prevent deleting useful files.Like $ alias rm="rm -iv"
Whenever one uses rm it will ask for users permission
Ex.$ “rm: remove regular file `test.c'? y”
And also it will give information to user that xyz.c file is deleted,
Ex. $ removed `test.c'
One can add this line alias rm="rm -iv" in .bashrc file so that whenever user login this options will be set as default.