agedu: Clean up wasted space in Linux
In some situations a quick trip to get a drive is required but in many situations space can easily be reclaimed by removing the gunk that’s accumulated, but how do you determine what’s junk? Linux has the
du command that will recursively search a director and list all files and there size but it still comes down to you to determine what should be kept and what should be removed.
agedu (age dee you). Like
du this new tool searches for files in all directories and lists there size, but it can also differentiate between files that are still in use and ones that haven’t been accessed less often.
From the man pages
agedu scans a directory tree and produces reports about how much disk space is used in each directory and sub-directory, and also how that usage of disk space corresponds to files with last-access times a long time ago.
In other words, agedu is a tool you might use to help you free up disk space. It lets you see which directories are taking up the most space, as du does; but unlike du, it also distinguishes between large collections of data which are still in use and ones which have not been accessed in months or years – for instance, large archives downloaded, unpacked, used once, and never cleaned up. Where du helps you find what’s using your disk space, agedu helps you find what’s wasting your disk space.
agedu has several operating modes. In one mode, it scans your disk and builds an index file containing a data structure which allows it to efficiently retrieve any information it might need. Typically, you would use it in this mode first, and then run it in one of a number of `query’ modes to display a report of the disk space usage of a particular directory and its sub-directories. Those reports can be produced as plain text (much like du) or as HTML. agedu can even run as a miniature web server, presenting each directory’s HTML report with hyperlinks to let you navigate around the file system to similar reports for other directories.
So, the install
Fedora 18, 19, 20 & 21
$ sudo yum install agedu Loaded plugins: langpacks Resolving Dependencies --> Running transaction check ---> Package agedu.x86_64 0:0-8.r9153.fc21 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================== Package Arch Version Repository Size ======================================================================================== Installing: agedu x86_64 0-8.r9153.fc21 fedora 55 k Transaction Summary ======================================================================================== Install 1 Package Total download size: 55 k Installed size: 88 k Is this ok [y/d/N]: y Downloading packages: agedu-0-8.r9153.fc21.x86_64.rpm | 55 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction (shutdown inhibited) Installing : agedu-0-8.r9153.fc21.x86_64 1/1 Verifying : agedu-0-8.r9153.fc21.x86_64 1/1 Installed: agedu.x86_64 0:0-8.r9153.fc21 Complete!
$ sudo apt-get install agedu
The first step is to let
agedu scan a directory, bellow I’ve just scanned my Downloads folder:
$ agedu -s ./Downloads/ Built pathname index, 1032 entries, 96364 bytes of index Faking directory atimes Building index Final index file size = 190304 bytes
To access the report you need run
agedus built in web server:
$ agedu -w Using Linux /proc/net magic authentication URL: http://127.0.0.1:43051/
Now just fire up your browser and go to the URL stated:
There are other options available such as
--include arguments which let you control what files are indexed, for example if you wanted to see what ISOs were taking up the most space you’d use:
agedu -s ./ --exclude '*' --include '*.iso'
This post was designed to written to give you a quick overview of
agedu since I have only touched on the options available. Check out the man pages or read thru the developers website for more details.