Linux中安全的`rm`方法


# add this to your ~/.bashrc file
trash()
{
for item in $@
do
mv $item /mnt/data/.RECYCLE/”`date ‘+%Y%m%d%H%M%S’`”-$item
done
}
alias del=’trash’

在终端下更新配置文件:

[root@localhost ~]# source ~/.bashrc

Advertisements