Recycle bin for command line terminal to avoid deleting without a second chance with the "rm" command.
I imagine that just like me, you have already deleted something with the "rm" command in your terminal. π
Then you had a regret for this action, and you wished you could recover this deleted item. π±
Impossible thing with the "rm" command. π
Thanks to rmtrash, you can now obtain a trash directly in your terminal to throw your waste there and recover it if necessary. π
- Installation
- Uninstallation
- Updating
- Usage or rmtrash command line
- Usage or emptyrmtrash command line
- Advice
- How to Contribute
- License
./build/installation/macos/install_macos.sh
This will create an invisible .RMTRASH directory in the "~" directory.
Finally this will install the necessary commands in the /usr/local/bin directory.
npm run install_macos
./build/installation/linux/install_linux.sh
This will create an invisible .RMTRASH directory in the ~ directory.
Finally this will install the necessary commands in the /usr/local/bin directory.
npm run install_linux
./build/uninstallation/macos/uninstall_macos.sh
This will remove the invisible directory .RMTRASH.
Finally, this will delete the commands in the /usr/local/bin directory.
npm run uninstall_macos
./build/uninstallation/linux/uninstall_linux.sh
This will remove the invisible directory .RMTRASH.
Finally, this will delete the commands in the /usr/local/bin directory.
npm run uninstall_linux
git pull; ./build/updating/macos/update_macos.sh
npm run update_macos
git pull; ./build/updating/linux/update_linux.sh
npm run update_linux
rmtrash [...items]
The deleted item(s) will be placed in your .RMTRASH located in the "~" directory.
rmtrash ls
rmtrash [-v] | [--version]
rmtrash [-h] | [-help] | [--help]
emptyrmtrash
emptyrmtrash -y
Run this command line to shred all files in the rmtrash and empty all items in it with confirmation:
emptyrmtrash [shred] | [-shred] | [--shred]
Run this command line to shred all files in the rmtrash and empty all items in it without confirmation:
emptyrmtrash [shred -y] | [-shred -y] | [--shred -y]
emptyrmtrash [-v] | [--version]
emptyrmtrash [-h] | [-help] | [--help]
You can very well if you wish to modify the name of the commands in your .bashrc or .zshrc file by creating aliases. π
Example:
-
In case you want to replace the original rm command:
alias rm="rmtrash"
-
In case you don't want to replace the original rm command:
alias rmt="rmtrash"
-
For emptyrmtrash command line:
alias em="emptyrmtrash"
Whether you want to help fix bugs, improve the documentation or spread the word, it will be a pleasure to taste this vanilla ice cream together. πͺ β€οΈ
Do not hesitate to take a look at the github repository of cli-rmtrash.
For any questions or suggestions do not hesitate to write to rudy.waks@gmail.com.
Licensed under the MIT License.