<返回更多

Linux 防 rm -rf 之 safe-rm

2022-04-25    木讷的诺
加入收藏

安装

# 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
声明:本站部分内容来自互联网,如有版权侵犯或其他问题请与我们联系,我们将立即删除或处理。
▍相关推荐
更多资讯 >>>