![]() Registered Member ![]()
|
Hi,
Is there a way of sending a file to Trash from command line? I want to have KDE's "Restore" capability when deleting a file from command line. thanks, yuval. |
![]() Administrator ![]()
|
Unfortunately it is a little more complicated than just moving the file. The file needs to be moved to ~/.local/share/Trash/files while ensuring no file of the same name already exists, and a ~/.local/share/Trash/info/<new name>.info file needs to be created. If the info file does not exist, then the file will not be shown.
Example info file:
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() KDE Developer ![]()
|
You can do this with the following command:
where 'file' is the file you want to trash See also ktrash4 for restoring or emptying the trash from command line. Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]