Whatever the size of your hard drive – and drives are now larger and cheaper than ever – it can be surprising just how quickly the available space gets eaten up. You can easily set about the task of deleting files you no longer needs, but how do you track down the big files that will make a real difference, particularly in a server environment where you have no access to any graphical file manager? This is where Agedu can help to analyze hard disk space usage in Linux.
Agedu is a command line utility that enables you to not only hunt down large files that are taking up valuable space on your hard drive but those that have not been accessed in a while. It is entirely possible that you have some very large files lurking in the darker recesses of your drive where you would not think to look.
In Ubuntu (or Ubuntu-based distro), you can easily install Agedu with the command:
sudo apt-get install agedu
However, the version in the repository is out-dated, so you might want to grab the latest version from the program website – scroll down to the Download section towards the bottom of the page to locate the download link.
Extract the contents of the tar.gz archive. Open the terminal and navigate to the agedu folder. Type the following commands to compile/install:
./configure make sudo make install
Once you have installed Agedu, the first thing you need to do is build up an index of the contents of your drive. To index your home directory, type the following command in the Terminal.
agedu -s /home
Once the index is created, you can then opt to view the data that has been gathered in your web browser.
Right click the URL and copy the link. Open your web browser and paste the URL into the address bar.
Here you can navigate through a series of graphs that indicates not only which folders are taking up the most room, but by hovering the mouse over a bar you can see when they were last accessed.
In this way, you can easily identify folders that are taking up a lot of space but do not necessarily contains files that you need to access very often – such folders could be moved to an external hard drive.
It might take you a little while to track down all of the space hogs, but using Agedu is a good deal faster than manually checking the size and usage history of folder after folder.
Don’t forget to clean up after Agedu. It leaves behind a potentially large index file in whatever folders you scan. This can be removed by running the following command at the Terminal:
agedu -s /home -w -R
Of course, you can replace /home with whichever folder you need.
Agedu also comes with several configuration options, so don’t forget to check out the man page for advanced usage.
On your desktop, there are more useful (graphical) tool that you can use to find out disk usage, but in a server, Agedu really shines.
Our latest tutorials delivered straight to your inbox