Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Make `rm` move to trash

I've looked everywhere for the answer, but I can't find it.

Is it possible to move/delete a file to the trash folder on linux. But also having the trashinfo file.

E.g I can move the file into the trash folder fine, but I don't have the trashinfo file.

tldr; How to delete a file to trash in BASH

Also, I'm using Ubuntu 12.10

share|improve this question

marked as duplicate by jw013, Renan, jasonwryan, Stéphane Gimenez, Gilles Nov 23 '12 at 23:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I'll copy my SO answer here:

In Ubuntu the trash files are kept in ~/.local/share/Trash/files

There is a trash command line interface that you can use. To install do:

sudo apt-get install trash-cli

Then, to trash something do:

trash-put myfile.txt
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.