使用safe-rm替换rm命令,防止误删除

使用safe-rm替换rm命令,防止误删除

wget https://launchpad.net/safe-rm/trunk/0.12/+download/safe-rm-0.12.tar.gz
tar -zxf safe-rm-0.12.tar.gz
cp safe-rm-0.12/safe-rm  /usr/local/bin/rm

cat >> /etc/profile <<EOF
PATH=/usr/local/bin:$PATH
EOF
source /etc/profile

cat > /etc/safe-rm.conf <<EOF
/
/*
EOF
posted @ 2021-09-21 21:07  1769987233  阅读(96)  评论(0编辑  收藏  举报