This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to "Move to Trash" with command line?

Tags: None
(comma "," separated)
rgaelzer
Registered Member
Posts
39
Karma
0
OS
Inside a c(K)onsole, I want to move some files to the Trash folder. However, if I simply type:
mv -f <file> ~/.local/share/Trash/files
I guess that the deadline for the permanent deletion of the file will not be recorded by the system, as it would be had I trashed the file with dolphin.
Is there any kde command to perform this task I can use from within a console?
Thanks.
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I don't know how to do it with the default tools (it feels like there should be a way), but maybe give trash-cli a try?


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
google01103
Manager
Posts
6668
Karma
25
from ktrash help:
note: to move files to the trash, do not use ktrash, but "kioclient move 'url' trash:/"


OpenSuse Leap 42.1 x64, Plasma 5.x



Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], lockheed