Web Content Display


In order to prevent data loss when it has been accidentally deleted with the command "rm -rf", you can add this function to your .bashrc file (located in your home directory). This function shows the files to be deleted and requests confirmation just once:

[user@mr-login ~]# vi ~/.bashrc

 

The new .bashrc would be installed the next time you log back in, but if you want it to be installed immediately, you can just source the file:

 
[user@mr-login ~]# source ~/.bashrc
 
To execute the function just in the login node and into interactive jobs in order to prevent requests inside sbatch jobs: