安装
# wget https://file.cnxiaobai.com/linux/Safe-rm/safe-rm-0.13.tar.gz
# tar -zxvf safe-rm-0.13.tar.gz -C /usr/local/
# mv safe-rm-0.13/ safe-rm
# cd safe-rm/
# cp safe-rm /usr/local/bin/rm
# ll !$
# export PATH=/usr/local/bin:/bin:/usr/bin:$PATH >>/etc/profile
# source /etc/profile
使用
# vim /etc/safe-rm.conf
/
/bin
/boot
/dev
/etc
/home
/initrd
/lib
/lib32
/lib64
/proc
/root
/sbin
/sys
/usr
/usr/bin
/usr/include
/usr/lib
/usr/local
/usr/local/bin
/usr/local/include
/usr/local/sbin
/usr/local/share
/usr/sbin
/usr/share
/usr/src
/var
/etc/safe-rm.conf