Sponsored Link
It scans the ~/.local/share/Trash/info directory and reads the .trashinfo files to determine their deletion date. Files older then 30 days are then removed including their trash information file.
Features:
* Remove files that are older then a given number of days (see the -d option)
* Purge older files to ensure a specific amount of disk space is free (see the --min-free option)
* Check for remaining disk space, and only delete if you are running out (see the --max-free option)
* Delete regex matching files first (see --delete-frist option)
Install autotrash in ubuntu 10.04/9.10
Open the terminal and run the following commands
sudo add-apt-repository ppa:bneijt/ppa
sudo apt-get update
sudo apt-get install autotrash
Using autotrash
It should be considered to be run as a crontab:
@daily /usr/bin/autotrash -d 30
Or more frequently, but to keep disk IO down, only when there is less then 3GB of free space:
@hourly /usr/bin/autotrash --max-free 3072 -d 30
To configure this, run "crontab -e" and add one of these lines in the editor, then save and close the file.
If you do not know how to work with crontab, you could add it to the startup
programs in GNOME using the menu: System -> Preferences -> Sessions
Add the program with the "+ Add" button.
This will make sure that your trash is cleaned up every time you log in.
You can achieve pretty much the same thing with trash-cli, and trash-cli is in the main repos:
http://marius.scurtescu.com/2009/05/05/control_your_trash
Marius