January 15, 2020

How to fix the rm -f problem

Linux user are confronted with a serious problem. The operating system doesn't ask many questions but it will execute the rm -rf command. The problem is, that all the data are deleted and it's not possible to recover them. To prevent such a mishap it's a good idea to reconfigure the rm command. Perhaps it would make sense if all Linux distributions would do so by default. What the average user want's is to delete files only with the file-manager but not with the rm command.

gedit ~/.bashrc

alias rm='rm -i'

alias cp='cp -i'

alias mv='mv -i'

source ~/.bashrc