{"id":12452,"date":"2019-03-27T01:36:50","date_gmt":"2019-03-27T01:36:50","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12452"},"modified":"2019-03-27T01:36:50","modified_gmt":"2019-03-27T01:36:50","slug":"agedu-a-useful-tool-for-tracking-down-wasted-disk-space-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/27\/agedu-a-useful-tool-for-tracking-down-wasted-disk-space-in-linux\/","title":{"rendered":"Agedu \u2013 A Useful Tool for Tracking Down Wasted Disk Space in Linux"},"content":{"rendered":"<p>Assume you are running short on disk space and you wanted to free up, by searching something that\u2019s a waste of space and removing it or moving it to an archive medium. How do you track down right stuff to delete, that saves maximum space?<\/p>\n<p>Linux provides a standard\u00a0<a href=\"https:\/\/www.tecmint.com\/check-linux-disk-usage-of-files-and-directories\/\" target=\"_blank\" rel=\"noopener\">du command<\/a>, which scans entire disk and shows you which directories hold the huge amount of data. That can assist you narrow your search to the things most useful deleting.<\/p>\n<p>However, that only shows you what\u2019s huge. What you actually want to know is what\u2019s too huge. By default,\u00a0<a href=\"https:\/\/www.tecmint.com\/check-linux-disk-usage-of-files-and-directories\/\" target=\"_blank\" rel=\"noopener\">du command<\/a>\u00a0will not let you differentiate between data that\u2019s huge because you are doing something that needs it to be huge, and data that\u2019s huge because you unpacked it once and ignored about it.<\/p>\n<p>Most Linux file systems, by default only shows\u00a0<a href=\"https:\/\/www.tecmint.com\/linux-stat-command-examples\/\" target=\"_blank\" rel=\"noopener\">when a file was last accessed<\/a>, but not shown when it was\u00a0<a href=\"https:\/\/www.tecmint.com\/find-and-sort-files-modification-date-and-time-in-linux\/\" target=\"_blank\" rel=\"noopener\">written, modified or even read<\/a>. So if you created a huge amount of data years ago, forgot to delete it and have never used it since, then it is important to use those last-access time stamps to know the difference between used and unused data.<\/p>\n<p><strong>Agedu<\/strong>\u00a0pronounced as (<strong>age dee you<\/strong>) is an open source and free utility (much like\u00a0<strong>du command<\/strong>) that helps system administrators to track down wasted disk space used by old files and delete them to free up some space.<\/p>\n<p><strong>Agedu<\/strong>\u00a0does a complete scan and produces reports that shows\u00a0<a href=\"https:\/\/www.tecmint.com\/find-top-large-directories-and-files-sizes-in-linux\/\" target=\"_blank\" rel=\"noopener\">how much disk space is utilized<\/a>\u00a0by 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.<\/p>\n<h4>Agedu Features<\/h4>\n<ol>\n<li>Creates graphical reports.<\/li>\n<li>Produces data output in HTML format.<\/li>\n<li>Generates HTML reports with hyperlinks to other directories for easy navigation to gather reports.<\/li>\n<li>Provides more configurable options.<\/li>\n<\/ol>\n<h3>How Does Agedu Works?<\/h3>\n<p>From the man page:<\/p>\n<blockquote><p>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.<\/p><\/blockquote>\n<h3>How to Install Agedu in Linux Systems<\/h3>\n<p>On\u00a0<strong>Debian\/Ubuntu<\/strong>,\u00a0<strong>agedu<\/strong>\u00a0is available to install from the default system repositories using following\u00a0<a href=\"https:\/\/www.tecmint.com\/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management\/\" target=\"_blank\" rel=\"noopener\">apt-get command<\/a>\u00a0as shown.<\/p>\n<pre>$ sudo apt-get install agedu\r\n<\/pre>\n<p>On\u00a0<strong>RHEL\/CentOS<\/strong>, you need to\u00a0<a href=\"https:\/\/www.tecmint.com\/install-and-enable-rpmforge-repository-in-rhel-centos-6-5-4\/\" target=\"_blank\" rel=\"noopener\">turn on EPEL repository<\/a>\u00a0to install\u00a0<strong>Agedu<\/strong>\u00a0using following\u00a0<a href=\"https:\/\/www.tecmint.com\/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement\/\" target=\"_blank\" rel=\"noopener\">yum command<\/a>\u00a0as shown.<\/p>\n<pre># yum install epel-release\r\n# yum install agedu\r\n<\/pre>\n<p><strong>Fedora<\/strong>\u00a0and\u00a0<strong>Arch Linux<\/strong>\u00a0users, simply type the following command to install\u00a0<strong>Agedu<\/strong>.<\/p>\n<pre>$ sudo dnf install agedu  [On <strong>Fedora<\/strong>]\r\n$ sudo yaourt -S agedu    [On <strong>Arch Linux<\/strong>]<\/pre>\n<p>On other Linux distributions, you can compile\u00a0<strong>Agedu<\/strong>\u00a0from source as shown.<\/p>\n<pre>$ wget https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/agedu\/agedu-20180329.af641e6.tar.gz\r\n$ tar -xvf agedu-20180329.af641e6.tar.gz\r\n$ cd agedu-20180329.af641e6\r\n$ .\/configure\r\n$ make\r\n$ sudo make install\r\n<\/pre>\n<h3>How to Track Wasted Disk Space Using Agedu<\/h3>\n<p>The following command will do a complete scan of\u00a0<strong>\/home\/tecmint<\/strong>\u00a0directory and its sub-directories and creates a special\u00a0<strong>index<\/strong>\u00a0file containing its data structure.<\/p>\n<pre># agedu -s \/home\/tecmint\/<\/pre>\n<div class=\"code-label\">Scan Linux System for Disk Space<\/div>\n<pre>Built pathname index, 232578 entries, 22842517 bytes of index                                                                                                                \r\nFaking directory atimes\r\nBuilding index\r\nFinal index file size = 97485984 bytes\r\n<\/pre>\n<p>Next, type the following command to query newly created index file.<\/p>\n<pre># agedu -w<\/pre>\n<h5>Sample Output :<\/h5>\n<pre>Using Linux \/proc\/net magic authentication\r\nURL: http:\/\/localhost:34895\/\r\n<\/pre>\n<p>Now, type the following command to open the\u00a0<strong>URL<\/strong>\u00a0using any web browser.<\/p>\n<pre># http:\/\/localhost:34895\/<\/pre>\n<h5>Graphical Output :<\/h5>\n<p>The below screen shows the graphical representation of disk usage of\u00a0<strong>\/home\/tecmint<\/strong>\u00a0along with its sub directories using various colors to show the difference between disused and recently accessed data.<\/p>\n<p>Click on any sub directory to see the reports of its sub-directories. To terminate this mode, just press [<code>CTRL+D<\/code>] on command line.<\/p>\n<div id=\"attachment_29020\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Linux-Disk-Space-Usage.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29020\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Linux-Disk-Space-Usage.png\" sizes=\"auto, (max-width: 1035px) 100vw, 1035px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Linux-Disk-Space-Usage.png 1035w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Linux-Disk-Space-Usage-768x660.png 768w\" alt=\"Linux Disk Space Usage\" width=\"1035\" height=\"890\" aria-describedby=\"caption-attachment-29020\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29020\" class=\"wp-caption-text\">Linux Disk Space Usage<\/p>\n<\/div>\n<p>To create and set custom port number for agedu, type the following command.<\/p>\n<pre># agedu -w --address 127.0.0.1:8081<\/pre>\n<h5>Sample Output :<\/h5>\n<pre>Using Linux \/proc\/net magic authentication\r\nURL: http:\/\/127.0.0.1:8081\/<\/pre>\n<p>Enable password protection for\u00a0<strong>Agedu<\/strong>\u00a0using the following command.<\/p>\n<pre># agedu -w --address 127.0.0.1:8081 --auth basic<\/pre>\n<div class=\"code-label\">Agedu Password Protect Reports<\/div>\n<pre>Username: agedu\r\nPassword: n2tx16jejnbzmuur\r\nURL: http:\/\/127.0.0.1:8081\/<\/pre>\n<div id=\"attachment_29022\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Password-Protect-Agedu.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29022\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Password-Protect-Agedu.png\" sizes=\"auto, (max-width: 1069px) 100vw, 1069px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Password-Protect-Agedu.png 1069w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Password-Protect-Agedu-768x549.png 768w\" alt=\"Password Protect Agedu\" width=\"1069\" height=\"764\" aria-describedby=\"caption-attachment-29022\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29022\" class=\"wp-caption-text\">Password Protect Agedu<\/p>\n<\/div>\n<div id=\"attachment_29021\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Linux-Directory-Disk-Space-Usage.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29021\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Linux-Directory-Disk-Space-Usage.png\" sizes=\"auto, (max-width: 1128px) 100vw, 1128px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Linux-Directory-Disk-Space-Usage.png 1128w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Linux-Directory-Disk-Space-Usage-768x593.png 768w\" alt=\"Linux Directory Disk Space Usage\" width=\"1128\" height=\"871\" aria-describedby=\"caption-attachment-29021\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29021\" class=\"wp-caption-text\">Linux Directory Disk Space Usage<\/p>\n<\/div>\n<p>Access Agedu reports using terminal mode.<\/p>\n<pre># agedu -t \/home\/tecmint<\/pre>\n<div class=\"code-label\">Show Disk Space Usage in Terminal<\/div>\n<pre>8612        \/home\/tecmint\/.AndroidStudio3.1\r\n3684        \/home\/tecmint\/.PlayOnLinux\r\n604         \/home\/tecmint\/.ScreamingFrogSEOSpider\r\n2416        \/home\/tecmint\/.TelegramDesktop\r\n61960       \/home\/tecmint\/.Write\r\n1508        \/home\/tecmint\/.adobe\r\n20          \/home\/tecmint\/.aptitude\r\n48          \/home\/tecmint\/.byobu\r\n1215948     \/home\/tecmint\/.cache\r\n3096        \/home\/tecmint\/.cinnamon\r\n1421828     \/home\/tecmint\/.config\r\n12          \/home\/tecmint\/.dbus\r\n8           \/home\/tecmint\/.emacs.d\r\n780         \/home\/tecmint\/.fonts\r\n...\r\n<\/pre>\n<p>You see the output similar to\u00a0<a href=\"https:\/\/www.tecmint.com\/check-linux-disk-usage-of-files-and-directories\/\" target=\"_blank\" rel=\"noopener\">du command<\/a>. Let\u2019s see the old files which are not accessed for long time. For example, to see only old files that are not accessed in last\u00a0<strong>12 months<\/strong>\u00a0or more.<\/p>\n<pre># agedu -t \/home\/tecmint -a 12m<\/pre>\n<div class=\"code-label\">Show Files Not Accessed in Last 12 Months<\/div>\n<pre>2416        \/home\/tecmint\/.TelegramDesktop\r\n1500        \/home\/tecmint\/.adobe\r\n46776       \/home\/tecmint\/.cache\r\n1840        \/home\/tecmint\/.cinnamon\r\n142796      \/home\/tecmint\/.config\r\n636         \/home\/tecmint\/.gconf\r\n88          \/home\/tecmint\/.gimp-2.8\r\n12          \/home\/tecmint\/.gnome\r\n112         \/home\/tecmint\/.java\r\n108         \/home\/tecmint\/.kde\r\n8           \/home\/tecmint\/.links2\r\n16          \/home\/tecmint\/.linuxmint\r\n6804        \/home\/tecmint\/.local\r\n12          \/home\/tecmint\/.mindterm\r\n40920       \/home\/tecmint\/.mozilla\r\n4           \/home\/tecmint\/.oracle_jre_usage\r\n12          \/home\/tecmint\/.parallel\r\n24          \/home\/tecmint\/.shutter\r\n6840        \/home\/tecmint\/.softmaker\r\n336         \/home\/tecmint\/.themes\r\n....\r\n<\/pre>\n<p>Let\u2019s find out how much disk space taken by\u00a0<strong>MP3<\/strong>\u00a0files by using following command.<\/p>\n<pre># agedu -s . --exclude '*' --include '*.mp3'\r\n<\/pre>\n<p>Again to see reports run the following command.<\/p>\n<pre># agedu -w<\/pre>\n<p>To deleted files and free up disk space, use the following command.<\/p>\n<pre># rm -rf \/downloads\/*.mp3<\/pre>\n<p>How to remove\u00a0<strong>agedu<\/strong>\u00a0index file? First see the size of the index file with the following command.<\/p>\n<pre># ls agedu.dat -lh<\/pre>\n<h5>Sample output :<\/h5>\n<pre>-rw------- 1 tecmint tecmint 35M Apr 10 12:05 agedu.dat<\/pre>\n<p>To remove index file, just enter.<\/p>\n<pre># agedu -R<\/pre>\n<p>For more information on agedu command options and usage, please read the man pages or visit\u00a0<a href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/agedu\/\" target=\"_blank\" rel=\"nofollow noopener\">agedu home page<\/a>.<\/p>\n<pre># man agedu<\/pre>\n<p>If you know any tool that we haven\u2019t mentioned in this site. Please let us know about it via comment box below.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/agedu-track-disk-space-usage-in-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Assume you are running short on disk space and you wanted to free up, by searching something that\u2019s a waste of space and removing it or moving it to an archive medium. How do you track down right stuff to delete, that saves maximum space? Linux provides a standard\u00a0du command, which scans entire disk and &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/27\/agedu-a-useful-tool-for-tracking-down-wasted-disk-space-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Agedu \u2013 A Useful Tool for Tracking Down Wasted Disk Space in Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12452","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12452"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12452\/revisions"}],"predecessor-version":[{"id":12453,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12452\/revisions\/12453"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}