Agedu pronounced as (age dee you) is an open source and free utility (much like du command) that helps system administrators to track down wasted disk space used by old files and delete them to free up some space. But how do you track down right stuff to delete and save maximum space?
Agedu does a complete scan and produces reports that shows how much disk space is utilized by each directory and sub directory along with the last-access times of files. In simple words, it simply helps you to free up disk space.
Agedu Features
- Creates graphical reports.
- Produces data output in HTML format.
- Generates HTML reports with hyperlinks to other directories for easy navigation to gather reports.
- Provides more configurable options.
How Does Agedu Works?
From the man page:
agedu is a program which does this. It does basically the same sort of disk scan as du, but it also records the last-access times of everything it scans. Then it builds an index that lets it efficiently generate reports giving a summary of the results for each subdirectory, and then it produces those reports on demand.
How to Install Agedu in RHEL, CentOS, Fedora
To install Agedu, you need turn on EPEL repository and run the following command to install it.
# yum install agedu
How to Scan disk using Agedu
The following command will do a complete scan of /home/tecmint directory and its sub-directories and creates a special index file contacting its data structure.
# agedu -s /home/tecmint/
Sample Output :
Built pathname index, 649 entries, 40010 bytes of index Faking directory atimes Building index Final index file size = 122528 bytes
Next, type the following command to query newly created index file.
# agedu -w
Sample Output :
Using Linux /proc/net magic authentication URL: http://127.0.0.1:35475/
Now, type the following command to open the URL using any web browser.
# http://127.0.0.1:42113/
Graphical Output :
The below screen shows the graphical representation of disk usage of /home/tecmint along with its sub directories using various colors to show the difference between disused and recently accessed data. Click on any sub directory to see the reports of its sub-directories. To terminate this mode, just press [CTRL]+[D] on command line.
To create and set custom port number for agedu, type the following command.
# agedu -w --address 127.0.0.1:8081
Sample Output :
Using Linux /proc/net magic authentication URL: http://127.0.0.1:8081/
Enable password protection for Agedu using the following command.
# agedu -w --address 127.0.0.1:8081 --auth basic
Sample Output :
Username: agedu Password: n2tx16jejnbzmuur URL: http://127.0.0.1:8081/
Access Agedu reports using terminal mode.
# agedu -t /home/temint
Sample Output :
89392 /downloads/antivir-workstation-pers-3.1.3.5-0 748 /downloads/lynis-1.3.0 390832 /downloads
You see the output similar to du command. Let’s see the old files which are not accessed for long time. For example, to see only old files that are not accessed in last 12 months or more.
agedu -t /downloads/ -a 12m
Let’s find out how much disk space taken by MP3 files by using following command.
# agedu -s . --exclude '*' --include '*.mp3'
Again to see reports run the following command.
# agedu -w
To deleted files and free up disk space, use the following command.
# rm -rf /downloads/*.mp3
How to remove agedu index file? First see the size of the index file with the following command.
# ls agedu.dat -lh
Sample output :
-rw------- 1 tecmint tecmint 16M Oct 27 01:22 agedu.dat
To remove index file, just enter.
# agedu -R
For more information on agedu command options and usage, please read the man pages or visit agedu home page.
# man agedu
If you know any tool that we haven’t mentioned in this site. Please let us know about it via comment box below.


