I aliased rm
to a echo use del or full path to rm
to save myself from accidental rm (just lost my $HOME
to it).
But sudo rm
still uses /bin/rm
. How can I alias it to also print same message?
PS: del
is alias to trash-put
I aliased rm
to a echo use del or full path to rm
to save myself from accidental rm (just lost my $HOME
to it).
But sudo rm
still uses /bin/rm
. How can I alias it to also print same message?
PS: del
is alias to trash-put
You could install you own version of rm in /usr/local/bin which is searched before /usr/bin where rm is.
Make a file 'sudo nano /usr/local/bin/rm' with the following contents:
Remember to make it executable
EDIT
I don't think it a good idea to change the semantic behavior of 'rm'. A lot of other programs and scripts are using 'rm' and expect it to behave in the normal way.