How to Find Wasted Disk usage With Agedu on Linux
agedu is a Linux tool used to track down the wasted disk usage. This tool will help you to find out the right stuff to delete and free up your disk space.
It 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.
sk@sk:~$ sudo apt-get install agedu
Agedu package will not be found in official repositories. So first, add EPEL repository with the following command:
[root@server ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Now install Agedu with following command:
[root@server ~]# yum install agedu -y
agedu [ options ] action [action...]
If you want to scan your home directory for disk usage, the command should be:
sk@sk:~$ agedu -s /home/sk/
The above command will scan all directories, sub directories for disk usage and build a large data file called agedu.dat in your current directory. If that current directory is inside /home/sk, it is smart enough to discount its own index file.
The sample output will be as shown below:
Built pathname index, 28928 entries, 2505705 bytes of index Faking directory atimes Building index Final index file size = 9538096 bytes
Now run the following command to see the reports:
sk@sk:~$ agedu -w
You will see an output like shown below:
Using Linux /proc/net magic authentication URL: http://127.0.0.1:46389/
Open up your browser and enter the URL http://127.0.0.1:46389/ shown in the above output.
The above graphical output shows the disk usage of the /home/sk directory in various colors. You can figure out which files/directories should be removed to free up the disk usage from the above output. Click on any directory to view the disk usage of its sub directories. To exit from the command, just press CTRL+D.
Assign custom port for Agedu
Use the following command to assign the custom port for Agedu:
sk@sk:~$ agedu -w --address 127.0.0.1:9000
sk@sk:~$ agedu -w --address 192.168.1.100:9000
Here 192.168.1.100 is my local IP address. You may see the following output after entering the above command:
Using Linux /proc/net magic authentication URL: http://127.0.0.1:9000/
Now you will able to access the Agedu web interface with URL http://127.0.0.1:9000 from your browser. To exit from Agedu command press CTRL+D.
Enable password protection for Agedu
You can secure Agedu web interface with a password. Use the following command to generate a password:
sk@sk:~$ agedu -w --address 127.0.0.1:9000 --auth basic
You may have the following output. Note down the username and password:
Username: agedu Password: gehs92b5rf2y83mc URL: http://127.0.0.1:9000/
It will create a username and password automatically for you. Open up the browser and navigate to http://127.0.0.1:9000. It will ask the username and password as shown below. Enter the username and password.
You can set a custom username and password if you like. To do so, enter the following command:
sk@sk:~$ agedu -w --address 127.0.0.1:9000 --auth basic --auth-fd 0
Now enter your username and password in the following format:
You should enter the username (eg. sk) and put a colon (:) and password (eg. password). Afterwards, press CTRL+D to exit. Now you will be able to access Agedu web interface with new username and password.
View Agedu reports from terminal
To view the reports from the terminal, use the following command:
sk@sk:~$ agedu -t /home/sk/
You may see the following like output:
25606780 /home/sk/Personal 384 /home/sk/Pictures
To access files which are not looked(accessed) for six months or more, use the following command:
sk@sk:~$ agedu -t /home/sk/ -a 6m
You can use the switches d for days, w for weeks, m for months and y for years. For example, if you want to see the files which are not accessed 7 days or more, enter the following command:
sk@sk:~$ agedu -t /home/sk/ -a 7d
View reports of a particular types of files
For example, if you want to see the disk usage taken by PDF files and want to omit all other files, just enter the following command:
sk@sk:~$ agedu -s . --exclude '*' --include '*.pdf'
The above command will scan only for disk usage taken by PDF files in the current directory and it omit all other types of files from scanning.
To view the report, enter the following command:
sk@sk:~$ agedu -w Using Linux /proc/net magic authentication URL: http://127.0.0.1:52272/
Open up browser and navigate to URL http://127.0.0.1:52272/. Now you will see the output only for disk usage taken by PDF files.
sk@sk:~$ agedu -s /home/sk/Downloads --exclude '*' --include '*.pdf'
The above command scans PDF files in the /home/sk/Downloads and omits all other directories and file types.
Deleting unused files
You have found out which directory is not using for long time, you can simply delete the directory or multiple directories with following command to free up the disk space:
sk@sk:~$ rm -fr directoryname
To delete the index file, enter the following command:
sk@sk:~$ agedu -R
rm -fr agedu.dat
To know more Agedu commands, refer the man pages.
sk@sk:~$ man agedu
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04 : Power Commands, power management application created by the Atareao team , this app helps users to...0 comments |
- Install Uget Download Manager In Ubuntu, Fedora, Debian : uGet is a very light-weight and powerful open source download manager. On March 4th, 2014 Uget Do...0 comments |
- Install Crashplan backup tool in Linux : CashPlan is an automated backup solution that either uses the CrashPlan Central server or any other ...0 comments |
- Download Elementary OS 'Luna' Official Wallpapers : Hi Guys, Am a great lover of Elementary OS, so I like to move almost everywhere with some its beaut...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Install Uget Download Manager In Ubuntu, Fedora, Debian
- Download Elementary OS ‘Luna’ Official Wallpapers
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
- Puppet agent Install Using Script
- Install Corosync and Pacemaker On CentOS 6.5
- Install Fail2Ban On Ubuntu Server 13.04/13.10
- How To Install Google Chrome in Fedora 20, 19, 18
- How to surf using Tor Browser Bundle
- New Games got Greenlit on Linux by Steam Today!
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .