12 November 2012

Trash-cli - Manage your Trash from Command Line

Leave a Comment

Trash-cli is a command line interface to the FreeDesktop.org trashcan. It implements the FreeDesktop.org trash specification. For each trashed file, it will remember the name, original path, date of deletion, and permissions. It interoperates with KDE and GNOME Trash, and is CLI compatible with the rm command.

To install Trash-cli in Ubuntu, open terminal and write the following command

$ sudo apt-get install trash-cli

The location of Trash folder is ~/.local/share/Trash.

Using Trash-cli Tool


1. trash-put <filename> : Move any file to the Trashcan.

$ trash-put testfile

Note: Above command move testfile into trash.

how to manage trash from terminal

2. trash-list : List all the content of the trashcan.

$ trash-list


3. restore-trash : Restore Deleted items from trashcan

$ restore-trash


4. trash-empty : Delete all files from the trash

$ trash-empty


That's it.
Enjoy :)


If You Liked This Post Please Take a Time To Share This Post

You May Also Like...

0 comments:

Post a Comment