Monday, April 29, 2024
52
rated 0 times [  52] [ 0]  / answers: 1 / hits: 66164  / 3 Years ago, fri, november 12, 2021, 6:55:03

I would like to know if there is a command I can issue in a terminal so I do not classically remove (rm) the file, but instead move it to trash (i.e. Nautilus Move to Trash behavior).



In case there is such a command, I would also be interested in knowing what it is.


More From » command-line

 Answers
6

As of 2017, gvfs-trash seems to be deprecated.


$ touch test
$ gvfs-trash test
This tool has been deprecated, use 'gio trash' instead.
See 'gio help trash' for more info.

You should use gio, specifically


gio trash

is the recommended way.


[#34451] Saturday, November 13, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wherejuic

Total Points: 53
Total Questions: 123
Total Answers: 117

Location: Zambia
Member since Mon, Jan 23, 2023
1 Year ago
wherejuic questions
Thu, Aug 19, 21, 18:07, 3 Years ago
Wed, May 12, 21, 03:23, 3 Years ago
Sat, Nov 13, 21, 05:27, 3 Years ago
Mon, Sep 5, 22, 17:36, 2 Years ago
;