Skip to content

Alternative to the rm command to retrieve deleted items

License

Notifications You must be signed in to change notification settings

mrwaks/cli-rmtrash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RECYCLE BIN FOR TERMINAL πŸ€ πŸ—‘οΈ

Labo-cli is released under the MIT license. A man who never misses a shot in his basket

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. πŸ™


❓ What’s In This Document


πŸ‘· Installation:

Run this command line to build on MAC OS from the root of the cli-rmtrash repository:

./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.

You can run it with npm command line from the root of the cli-rmtrash repository:

npm run install_macos

Run this command line to build on LINUX OS from the root of the cli-rmtrash repository:

./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.

You can run it with npm command line from the root (.):

npm run install_linux

Go back to summary ⬆️


πŸ‘· Uninstallation:

To uninstall rmtrash on MacOs, run this from the root of the cli-rmtrash repository:

./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.

You can run it with npm command line from the root of the cli-rmtrash repository:

npm run uninstall_macos

To uninstall rmtrash on Linux, run this from the root of the cli-rmtrash repository:

./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.

You can run it with npm command line from the root of the cli-rmtrash repository:

npm run uninstall_linux

Go back to summary ⬆️


πŸ‘· Updating:

To update rmtrash to the latest version, just run from the root of the cli-rmtrash repository:

With Macos:

git pull; ./build/updating/macos/update_macos.sh

or with npm:

npm run update_macos

With Linux:

git pull; ./build/updating/linux/update_linux.sh

or with npm:

npm run update_linux

Go back to summary ⬆️


πŸŽ“ Usage with rmtrash command line:

Run this command line to place in the rmtrash bin:

rmtrash [...items]

The deleted item(s) will be placed in your .RMTRASH located in the "~" directory.

Run this command line to listing content of rmtrash bin:

rmtrash ls

Run this command line to see the version of rmtrash:

rmtrash [-v] | [--version]

Run this command line to open the helper:

rmtrash [-h] | [-help] | [--help]

Go back to summary ⬆️


πŸŽ“ Usage with emptyrmtrash command line:

Run this command line to empty the rmtrash bin with confirmation:

emptyrmtrash

Run this command line to empty the rmtrash bin without confirmation:

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]

Run this command line to see the version of rmtrash:

emptyrmtrash [-v] | [--version]

Run this command line to open the helper:

emptyrmtrash [-h] | [-help] | [--help]

Go back to summary ⬆️


πŸ’‘ Advice:

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"

Go back to summary ⬆️

🀝 How to Contribute

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.

Go back to summary ⬆️

πŸ“ License

Licensed under the MIT License.

Go back to summary ⬆️


P.S:

πŸ—‘οΈ ♻️ Please keep clean and throw your waste in the trash πŸ™

Go back to summary ⬆️

About

Alternative to the rm command to retrieve deleted items

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages