Use rm Safely

#unix #Linux

Use rm command it will delete the files permanently and doesn’t move those files to Trash Can like how file manger does. This post introduce a script to avoid this situation.

Download the script and put it a directory contained in PATH

    wget --no-check-certificate https://raw.githubusercontent.com/lagerspetz/linux-stuff/master/scripts/saferm.sh -O $HOME/bin/saferm.sh
    chmod +x $HOME/bin/saferm.sh

In bashrc file, set

    alias rm=saferm.sh
    exec $SHELL