Linux, Mac command line does not have the Recycle Bin function, a lot of time hand shake on the important documents to RM-FR *, although Linux may be found through lost +found/debugfs, but the difficulty is relatively large, can not be guaranteed to get back. People will always make mistakes, I work in the past few years also committed 3 RM-FR after the deletion of regret the mistake, and regret better than to prevent in the first, like desktop operating system (Windows, Mac OS, Ubuntu) as a recycle Bin mechanism can be, after a few days of efforts finally realized, Put it on GitHub, welcome.
Source Address: Https://github.com/LaiJingli/rmtrash
rmtrash is the Linux and Mac command line version of RM's Recycle Bin, after installation to the user transparent, in line with the normal use of RM habits, and he was not afraid of RM when the hand trembled.
rmtrash stands for "rm trash" which acts just as the system built-in RM Command,and just moves the file to the trash fo R recovery when needed.
Warning: Rmtrash is mainly used to prevent human error deletion, the Recycle Bin itself cannot replace the normal data backup operation of the system, and data backup is still very important.
Here's a small one:
This article mainly refers to the following 2 articles, to express our thanks to the author:
The implementation of Recycle Bin function in Linux http://www.ibm.com/developerworks/cn/linux/1410_licy_linuxtrash
Bash getopts-Let your script support command-line arguments http://linux.cn/article-3204-1.html
Linux/mac under command line RM Recycle Bin--rmtrash