I would like to know how can I delete a file and/or move it to trash with mv command?
I know where the trash located is, then I tried with this commands to move it to trash:
mv somefile /home/username/.local/share/Trash
this command work fine, but when I open trash in launcher it's still show empty. I can undo this deleted file in original location with:
mv /home/username/.local/share/Trash/somefile ~/
but if this location /home/username/.local/share/Trash isn't for Trash then where is moved my file?
I know rm will permanently delete file and not send it to a trash folder and there is no flag in man rm to delete file to trash.
mvto move a file to trash, you will never enjoy the option to restore that file from the trash! From here my downvote (sorry). – Radu Rădeanu Sep 17 '14 at 06:00mvcommand twice for two different files from different directories, but with the same name? Not to say that you have to remember all the time which was the previous file location. – Radu Rădeanu Sep 17 '14 at 07:11man gvfs-trashfor more info. – Radu Rădeanu Sep 17 '14 at 07:17mvis bad in this case. – Radu Rădeanu Sep 17 '14 at 07:42mvdoesn't has this property: to remember from where a file was moved (only you orhistorycan do this). – Radu Rădeanu Sep 17 '14 at 07:53