Automatically Delete Files older than N days From Trash using Autotrash

This post was written by admin on July 13, 2010
Posted Under: General

Autotrash is a simple Python script comes with Ubuntu 10.10 Maverick Meerkat which will purge files from your trash when they become older than a given days,purge older files to ensure a specific amount of disk space is free,etc.It uses the FreeDesktop.org Trash Info files included in the new GNOME system to find the correct files and the dates they where deleted.

Features:

* Remove files that are older then a given number of days
(autotrash -d N,where N is the number of days)
* Purge older files to ensure a specific amount of disk space is free
(autotrash --min-free=M,M is the amount of free space you want to ensure you have, in megabytes.)
* Check for remaining disk space, and only delete if you are running out
(autotrash --max-free=M,M is the amount of free space left, in megabytes.)
* Delete regex matching files first (see –delete-frist option)

For more info,execute this in terminal:

autotrash --help

AutoTrash is already in Ubuntu 10.10′s repository,it can be installed from Ubuntu Software Center.For Ubuntu 10.04 and 9.10 user,install this from PPA:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install autotrash

Or,just download a deb and double click to install:

Ubuntu 10.04: autotrash_0.1.1-1~webupd8~lucid_all.deb
Ubuntu 9.10: autotrash_0.1.1-1~webupd8~karmic_all.deb

More,read: http://www.logfish.net/pr/autotrash/

Related posts:

  1. Clean up cache,useless file/kernel to free disk space by Ubuntu-Tweak
  2. Clean useless files to free disk space and guard your privacy with BleachBit
  3. Save Ubuntu space-auto-delete downloaded packages after installation
  4. Empty Ubuntu Gnome Trash in command line
  5. Add “Delete Permanently” into Ubuntu Nautilus right-click Menu

    Reader Comments

    Add a Comment

    required, use real name
    required, will not be published
    optional, your blog address