We all know that when we delete a file/folder, they will be moved to a temporary location called ‘Trash’ or ‘Recycle bin’. We can then either delete the contents of Trash permanently or restore them if we need them again. However, if you’re a heavy command-line user and looking for a command-line alternative way to use Trashcan from command line; you need to check ‘Trash-cli’ utility. Trash-cli is a command-line trashcan for Unix-like systems. It uses the same trashcan used by GNOME, KDE, and XFCE, but you can use it from the Terminal. Using trash-cli, we can delete, restore items as the way we do in the graphical Trashcan.
#!/bin/sh
yum install epel-release -y
yum install git clone -y
git clone https://github.com/andreafrancia/trash-cli.git
yum install screen -y
/usr/bin/screen
cd /root/trash-cli
sudo python setup.py install
echo "recycle bin created"
Usage
Trash-cli supports the following functions:
trash-put – Delete files and folders
trash-empty – Empty the trashcan.
trash-list – List deleted files and folders.
trash-restore – Restore a trashed file or folder.
trash-rm – Remove individual files from the trashcan.
Usage
Trash-cli supports the following functions:
trash-put – Delete files and folders
trash-empty – Empty the trashcan.
trash-list – List deleted files and folders.
trash-restore – Restore a trashed file or folder.
trash-rm – Remove individual files from the trashcan.
Hope this will
help you
Enjoy!
Comments
Post a Comment