If you are running out of disk space in Linux and want to find wasted disk space and delete or move to archive media to free up space, how do you find the right content to delete? To maximize the use of space.
Linux provides a standard du command that directly scans the entire disk to show which directories contain which amounts of data. You can narrow lookup access to the content that needs to be deleted the most. However, this method only shows which data is large, and does not distinguish more specifically. By default, most Linux file systems display the time when the file was last accessed, and do not display the time when the file was written, modified, or even read. If you create a lot of data early on but forget to delete it and never use it again, it's critical to use these last access timestamps to learn more about the difference between used and unused data.
Agedu is an open source, free application that helps administrators track down wasted disk space occupied by old files and delete them to free up space. Agedu provides a full scan and generates reports that show how much disk space each directory and subdirectory occupies, as well as when the files were last accessed. Provides the ability to create graphical reports, generate data output in HTML format, generate HTML reports with hyperlinks to other directories, facilitate navigation to collect reports, and provide more configurable options.
To install Agedu in Linu, you can use the apt-get command to install it from the default system repository (Debian/Ubuntu) :
$sudo apt-get Install agedu
On RHEL/CentOS, open the EPEL repository to install Agedu using the following yum command:
# yum Install epel-release
# yum Install agedu
Fedora and Arch Linux users can install Agedu by simply entering the following command:
$sudo dnf install agedu [on Fedora]
$sudo yaourt -S agedu [on Arch Linux]
To use Agedu tracking to waste disk space, first do a full scan of directories and subdirectories and create files with special indexes for data structures:
# agedu -s /home/tecmint/
Scan the disk space of the Linux system
Built pathname index, 232578 entries, 22842517 bytes of index
Faking directory atimes
Building index
Final index file size = 97485984 bytes
Next, enter the following command to query the newly created index file.
# agedu -w
Similar results are displayed:
Using Linux /proc/net magic authentication
URL: http://localhost:34895/
Now, type the following command to open the URL using any Web browser:
# http://localhost:34895/
A graphical representation of disk usage for /home/tecmint and its subdirectories is displayed, and colors are used to show the difference between discarded data and recently accessed data.
Click on any subdirectory to view reports for its subdirectories. To terminate this mode, simply CTRL+D and press [] on the command line.
To create and set up a custom port number for agedu, enter the following command.
# ageduc-w -- address 127.0.0.1:8081
The output:
Using Linux /proc/net magic authentication
URL: http://127.0.0.1:8081/
Enable password protection for Agedu with the following command.
# agedu-w --address 127.0.0.1:8081 --auth basic
Agedu Password Protection Report:
Username: agedu
Password: n2tx16jejnbzmuur
URL: http://127.0.0.1:8081/