On Linux mistakenly deleted files is a very scary thing, but there are trash-cli is not afraid of 1. Determine if Git is installed on the system
[Root@localhost ~]# git--version
git version 1.7.1
[Root@localhost ~]#
Install git if not installed
[Root@localhost ~]# Yum Install Git-core
2. Cloning trash-cli to local [Root@localhost local]# git clone https://github.com/emanon-was/trash-cli.git/usr/local/trash-cli
3. Configure Environment Variables [Root@localhost local]# export path=/usr/local/trash-cli/bin: $PATH
4. Common commands Delete files trash-put xxx.txt view Recycle Bin trash-list Restore files trash-restore empty Recycle Bin trash-empty Delete files in Recycle Bin Trash-remove
5. Create aliases for RM, delete files and go to Recycle Bin [Root@localhost ~]# alias rm= ' Trash-put '
[Root@localhost ~]# alias RM
Alias rm= ' Trash-put '
[Root@localhost ~]#
Later delete the file can use RM xxx.txt directly to the Recycle Bin, is not very convenient to test a wave:
Finally thank the author "Emanon-was" to provide tools for more information see HTTPS://GITHUB.COM/EMANON-WAS/TRASH-CLI