If we want to delete something in linux, we use the command ‘rm’, but it’s dangerous, because this command will delete it(them) from our hard disk, meaning we can not restore it when we want to. So for safe, we can move our files we want delete to trash bin.That’s what trash-cli does.
You can also use script to replace trash-cli, i.e. move $1 ~/.local/share/Trash. However, I still suggest you install trash-cli.
There are some problems when we install trash-cli on centos using the command:
#yum install trash-cli
The Yum will tell you no valid packages. You can follow the steps below and succeed!
INSTALL
1.Download the latest rpmforge-release rpm from : http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/, if your arctecture is x86_64, then go to : http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/
you can use the command:
wget http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-1.el6.rf.i686.rpm
2.Install rpmforge-release rpm:
#rpm -Uvh rpmforge-release-0.5.2-1.el6.rf.i686.rpm
3.Install trash-cli rpm package:
#yum install trash-cli
You can learn it with command: man trash-list