trash-cli

There is one feature I often missed in linux console - deleting to Trash. I often do a 'rm -rf' and then suddenly realize that I have accidentally deleted something which I shouldn't have. From now on, I needn't worry because I have started using trash-cli, a command line interface to the freedesktop.org trashcan. This small utility provides commands to delete and restore files from the console. The version shipped with Debian is really old and has a serious bug which could destroy data. Therefore it is best to install it using python setuptools. Run the below commands as root to install it:

# apt-get install python-setuptools
# easy_install --prefix=/usr/local trash-cli
# cd /usr/local/bin
# ln -s trash-put trash

Instructions for installing on other distributions are at http://code.google.com/p/trash-cli/wiki/Download. Usage instructions can be found in the home page of trash-cli itself.

This is yet another one of those linux utilities which is very simple but is extremely useful. I love Linux !!!

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.