trash is a command line interface trashcan freedesktop.org specs compliant. For each trashed file remember name, original path, date of deletion, and permissions. Inter operate with KDE Trash.
Here are some key features of "trash":
· Command line interface compatible with on of the rm command. You can alias rm with trash.
· Remembers original path, deletion time and file permissions of each trashed file.
· Compatible with the KDE trash.
· Implements the FreeDesktop.org Trash Specification
· Works with volume other than the home volume (e.g. USB pen or another partition).
Requirements:
· Python
Usage:
To remove move foo in the trash can, use
$ trash foo
To list all the contents of the trashcan
$ list-trash
2007-08-30 12:36:00 /home/andrea/foo
2007-08-30 12:39:41 /home/andrea/bar
2007-08-30 12:39:41 /home/andrea/bar2
2007-08-30 12:39:41 /home/andrea/foo
Search for a specific file in the trashcan
$ list-trash | grep foo
2007-08-30 12:36:00 /home/andrea/foo
2007-08-30 12:39:41 /home/andrea/foo
To restore a trashed file
$ restore-trash
0 2007-08-30 12:36:00 /home/andrea/foo
1 2007-08-30 12:39:41 /home/andrea/bar
2 2007-08-30 12:39:41 /home/andrea/bar2
3 2007-08-30 12:39:41 /home/andrea/foo2
4 2007-08-30 12:39:41 /home/andrea/foo
What file to restore [0..4]: 4
$ ls foo
foo
What's New in This Release:
· Now empty-trash remove directories without failing.
· An incompatibility with KDE Trash has been fixed.
Product's homepage