You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, April 8th 2005, 2:41pm

trash command line

Is there a way to send a file to the kde 3.4 trash bin from the command line?

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Saturday, April 9th 2005, 4:50pm

According to this http://lists.kde.org/?l=kde-devel&m=110513719006887&w=2 there is a commandline program called ktrash

And you can use kfmclient as well as David points out :D

Cheers,
_
Qt/KDE Developer
Debian User

3

Saturday, April 9th 2005, 5:02pm

Great. Here's a trash script for lazy folks like me.

#!/bin/bash
# Move files to trash:/

kfmclient move "$@" trash:/

4

Friday, January 6th 2006, 1:40am

Work in progress.

KTrash in filrenameutils-1.6 supports the KDE-3.4 trash can.
It's still mostly untested though.
http://filerenameutils.sf.net

5

Sunday, April 23rd 2006, 2:59am

KDE trash command line utility

The KTrash utility can also be used to powerfully removed
(and then restore) files with "find". For example, to delete all the kbounce
game files:

KTrash -e
find /opt/kde -name *bounce* | xargs KTrash

You can then save the ~/.local/share/Trash directory
and optionally restore it at a later time, restoring all the
deleted files with

KTrash -R

bram85

Professional

Posts: 948

Location: Eindhoven

Occupation: Software Engineer

  • Send private message

6

Sunday, April 23rd 2006, 10:26am

A little bit off topic, but still about scripting and trash: some time ago I wrote a script to automatically remove all files in the trash older than a certain amount of days.

http://bram85.blogspot.com/2005/11/only-…-trash-bin.html

It might be interesting :)
Bram Schoenmakers
KDE Netherlands (www.kde.nl)