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.
trash command line
Is there a way to send a file to the kde 3.4 trash bin from the command line?
Great. Here's a trash script for lazy folks like me.
#!/bin/bash
# Move files to trash:/
kfmclient move "$@" trash:/
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
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)