agedu(1)
Okay bestie, this is the manual page for agedu (section 1 ๐), written by Simon Tatham ๐ฆ. Let's get into it โจ
๐ NAME ๐
agedu, which correlates disk usage with last-access times so you can identify large and disused data ๐ฅ
๐ธ SYNOPSIS ๐ธ
agedu [ options ] action [action...]
โจ DESCRIPTION โจ
okay so agedu scans a directory tree and gives you reports on how much disk space each directory and subdirectory is eating ๐
, AND how that usage lines up with files that were last accessed a long time ago ๐
In other words, agedu is basically your best friend for freeing up disk space ๐งน. It lets you see which directories are taking up the most room, just like du does. But unlike du, it also tells apart big piles of data that are still in use from the ones nobody has touched in months or years ๐. Think huge archives that got downloaded, unpacked, used once, and then never cleaned up. Where du helps you find what's using your disk space, agedu helps you find what's wasting your disk space ๐.
agedu has several operating modes ๐ง. In one mode, it scans your disk and builds an index file holding a data structure that lets it efficiently retrieve any info it might need. Usually you'd use that mode first, and then run it in one of a number of query modes to display a report of the disk space usage for a particular directory and its subdirectories. Those reports can come out as plain text (much like du) or as HTML. And agedu can even run as a miniature web server ๐, showing each directory's HTML report with hyperlinks so you can click around the file system to similar reports for other directories.
So you'd typically start by telling it to scan a directory tree and build an index. This is done with a command such as:
$ agedu -s /home/fred
which builds a large data file called agedu.dat in your current directory. (If that current directory is inside /home/fred, don't stress ๐ซถ. agedu is smart enough to discount its own index file.)
Having built the index, you'd now query it for disk usage reports. If you have a graphical web browser, the simplest and nicest way to query the index is web server mode:
$ agedu -w
which will print (among other messages) a URL on its standard output, along the lines of:
URL: http://127.0.0.1:48638/
(That URL will always begin with 127., meaning it's in the localhost address space. So only processes running on the same computer can even try to connect ๐, and there's access control to stop other users from seeing it. See below for more detail.)
Now paste that URL into your web browser and boom โจ, you get a graphical representation of the disk usage in /home/fred and its immediate subdirectories. Different colours show the difference between disused and recently-accessed data ๐. Click any subdirectory to descend into it and see a report for its subdirectories in turn. Click parts of the pathname at the top of any page to return to higher-level directories. When you're done browsing, just press Ctrl-D to send an end-of-file indication to agedu, and it'll shut down ๐.
After that, you probably want to delete the data file agedu.dat, since it's pretty large ๐. Good news: the command agedu -R will do this for you ๐งน. You can also chain agedu commands on the same command line, so instead of the above you could have done:
$ agedu -s /home/fred -w -R
That's one self-contained run of agedu that builds its index, serves web pages from it, and cleans it up when it's finished ๐
.
Sometimes you want to scan the directory structure of one computer but run agedu's user interface on another ๐. In that case, use the agedu -S option in place of agedu -s. That makes agedu skip building an index file and instead just write out its scan results in plain text on standard output. Then you can funnel that output to the other machine using SSH (or whatever technique you prefer). There, run agedu -L to load in the textual dump and turn it into an index file. For example, you might run a command like this (plus any ssh options you need) on the machine you want to scan:
$ agedu -S /home/fred | ssh indexing-machine agedu -L
or, equivalently, run something like this on the other machine:
$ ssh machine-to-scan agedu -S /home/fred | agedu -L
Either way, the agedu -L command will create an agedu.dat index file, which you can then use with agedu -w just as above ๐.
(Another way to do this might be to build the index file on the first machine as normal, and then copy it to the other machine once it's complete. However, for efficiency, the index file is formatted differently depending on the CPU architecture that agedu is compiled for ๐ค. So if that doesn't match between the two machines, e.g. if one is a 32-bit machine and one 64-bit, then agedu.dat files written on one machine will not work on the other. The technique described above using -S and -L should work between any two machines ๐.)
If you don't have a graphical web browser, no stress. You can do text-based queries instead of using agedu's web interface ๐ฆ. Having scanned /home/fred in any of the ways suggested above, you might run:
$ agedu -t /home/fred
which again gives a summary of the disk usage in /home/fred and its immediate subdirectories. This time agedu prints it on standard output, in much the same format as du. If you then want to find out how much old data is hiding in there, add the -a option to show only files last accessed a certain length of time ago. For example, to show only files which haven't been looked at in six months or more:
$ agedu -t /home/fred -a 6m
That's the essence of what agedu does ๐. It has other modes of operation for more complex situations, plus the usual array of configurable options. The following sections contain a complete reference for all its functionality ๐.
โจ OPERATING MODES โจ
okay so this section is all about the operating modes agedu supports ๐ Each one is a command-line option, sometimes with an argument attached. You can stack multiple modes in one command line, and agedu will do them one after another. Like, we already saw that you might scan a disk and immediately launch a web server showing reports from that scan. Main character energy ๐
-s directory,--scan directoryโ okay this is the scanning mode ๐ agedu walks the file system starting at the directory you give it, then indexes everything into a big data file that other modes can query. It's giving organized chaos ๐
By default the scan stays inside a single file system. This makes sense because you're probably doing this since a particular disk partition is running low on space ๐ You can lift that restriction with --cross-fs. Other config options let you include or exclude files or whole subdirectories from the scan, and the next section has all the details on those ๐
The index file gets created with restrictive permissions, just in case the file system you're scanning has confidential info hiding in its structure ๐
Index files depend on the CPU architecture you made them on, so don't expect to move one to a different type of computer and have it keep working ๐ If you need to transfer disk scan results to a different kind of computer, check out -D and -L below ๐ฆ
-w,--webโ this mode expects an index file that's already been written ๐ธ agedu grabs a network port and starts a web server on it, serving reports generated from the index. By default it invents its own URL and prints it out for you.
The web server keeps running until agedu gets an end-of-file event on its standard input. The vibe is: run it from the command line, browse the pages until you're satisfied, then press Ctrl-D โจ If you want to turn that EOF behaviour off, use --no-eof.
If the index file has confidential info about your file system, the web server protects the pages from other people ๐ซถ On Linux this happens automatically: it checks the owner of each incoming connection using /proc/net/tcp. If that doesn't work, the server requires a password to view the reports, and agedu prints the password it invented on standard output along with the URL ๐
Configurable options for this mode let you pick your own address and port to listen on, choose your own authentication method (including turning authentication off completely), and set a username and password of your choice ๐
-t directory,--text directoryโ in this mode agedu spits out a textual report on standard output, listing disk usage for the directory you specify and all its subdirectories down to a certain depth ๐ By default that depth is 1, so you get a report for the directory itself plus all its immediate subdirectories. Want a different depth, or no depth limit at all? Use-d, which we'll cover in the next section ๐ง
Used on its own, -t just lists the total disk usage in each subdirectory. agedu's extra ability to tell unused data apart from recently-used data isn't switched on yet ๐ญ To activate it, use the -a option to specify a minimum age.
The directory structure stored in the index file is treated as a set of literal strings, which means you can't refer to directories by synonyms ๐
โโ๏ธ So if you ran agedu -s ., every path you later pass to -t has to be either . or start with ./. Symbolic links inside the directory you scanned won't be followed either, so you need to refer to each directory by its canonical, symlink-free pathname ๐
-R,--removeโ this mode deletes the index file ๐๏ธ Running justagedu -Ron its own is literally the same as typingrm agedu.dat. But you can also tack-Ronto the end of a command line, which tells agedu to delete the index file after it finishes everything else ๐-S directory,--scan-dump directoryโ this one scans a directory tree and converts the results straight into a textual dump on standard output ๐ No index file gets generated at all. The dump data is meant foragedu -Lto read ๐-L,--loadโ in this mode agedu reads a dump produced by-Sfrom its standard input ๐ฅน It builds an index file from that dump, exactly as if it had read the same data from a disk scan in-smode. Literally identical results, no notes โจ-D,--dumpโ this mode reads an existing index file and produces a dump of its contents on standard output, in the same format used by-Sand-L๐ค This is the move if you want to convert an existing index file into a format a different kind of computer can handle. Dump it with-D, then load the dump back in on the other machine using-L. Bestie logic ๐ง
(Heads up: the output of agedu -D on an existing index file won't be exactly identical to what agedu -S would have originally produced ๐ That's because of a difference in how last-access times on directories are treated. It should still be effectively equivalent for most purposes. See the documentation of the --dir-atime option in the next section for more tea on that.)
-H directory,--html directoryโ agedu generates an HTML report of disk usage in the directory you specify and its immediate subdirectories ๐ It's the same form that the web server serves in-wmode, so it's giving familiar vibes. By default you get one single HTML report, written straight to standard output, with no hyperlinks pointing to other pages. If you also specify-d(see the next section), agedu writes out a whole collection of HTML files linked to each other instead, and the top-level file is calledindex.html๐ฆ--cgiโ okay this one is for web servers ๐ In this mode agedu runs as the bulk of a CGI script, providing the same set of web pages the built-in web server would. It reads the usual CGI environment variables and writes CGI-style data to its standard output ๐
The actual CGI program should be a tiny wrapper around agedu that passes it the --cgi option, and probably -f too so it can find the index file. agedu handles everything else. For example, your script might look like this:
#!/bin/sh
/some/path/to/agedu --cgi -f /some/other/path/to/agedu.dat
Important tea โ: agedu produces the entire CGI output, including the status code, HTTP headers and the full HTML document. If you try to wrap the agedu --cgi call in code that adds your own HTML header and footer, you won't get the results you want, and agedu's HTTP-level features (like auto-redirecting to canonical versions of URIs) will stop working ๐ญ
No access control happens in this mode, so restricting access to CGI scripts is assumed to be the web server's job ๐
--presort,--postsortโ in these two modes, agedu expects to read a textual data dump from standard input, of the form produced by-S(and-D) ๐งฉ It transforms the data into a different version of its text dump format, then writes the transformed version to standard output.
The ordinary dump format is reasonably readable, but loading it into an index file with agedu -L requires it to be sorted in a specific order. That order is complicated to describe and really hard to pull off with ordinary Unix sorting tools ๐ So if you want to build your own dump from a source that agedu doesn't know how to scan, you'll need to make sure it's sorted in the right order.
To help with that, agedu provides a secondary dump format called sortable. It's sortable in the sense that plain sort(1) with no arguments will arrange it into the right order โจ The catch is that the sortable format is much more unreadable and also twice the size, so you definitely wouldn't want to write it directly ๐
So the recommended procedure is: generate dump data in the ordinary format, pipe it through agedu --presort to turn it into the sortable format, sort it, then pipe it into agedu -L (which can accept either the normal or the sortable format as input). For example:
generate_custom_data.sh | agedu --presort | sort | agedu -L
If you ever need to transform the sorted dump file back into the ordinary format, agedu --postsort can do that for you ๐ But since agedu -L accepts either format as input, you might not even need it ๐
-h,--helpโ makes agedu print some help text and terminate immediately ๐-V,--versionโ makes agedu print its version number and terminate immediately ๐ข
โจ OPTIONS โจ
okay this section covers the various configuration options that affect how agedu operates in one mode or another ๐ Some of them are super specific, some are basically universal, so let's start with the big one.
The following option affects nearly all modes (except -S):
-f filename,--file filenameโ this sets the location of the index file that agedu creates, reads or removes, depending on what mode it's in ๐ By default it's simplyagedu.dat, sitting in whatever the current working directory is when you run agedu ๐ธ
The following options affect the disk-scanning modes, -s and -S:
--cross-fsand--no-cross-fsโ okay so these decide whether the scan is allowed to cross between different file systems ๐ธ The default is not to, so agedu will normally skip over subdirectories that have a different file system mounted on them ๐ โโ๏ธ That's super handy when a drive is running low and you only want to free up space on that one file system ๐
But sometimes you want the big picture no matter which file system the data lives on โจ Like, if your real worry is your backup media running out of space, and your backups don't treat different file systems any differently, then use --cross-fs ๐ซถ
(Note that this default is the opposite way round from the corresponding option in du. ๐)
--prune wildcardand--prune-path wildcardโ these are the bouncers ๐ซ They cause particular files or directories to be left out of the scan completely. If agedu runs into a file or directory whose name matches the wildcard you gave--prune, it won't put that file in its index, and if it's a directory, it skips right over it and doesn't scan what's inside ๐
Heads up: in most Unix shells you'll probably need to escape wildcards on the command line ๐ Otherwise the shell expands the wildcard before agedu ever sees it.
--prune-path is basically the same energy, except the wildcard gets matched against the entire pathname instead of just the filename at the very end ๐ฃ๏ธ So --prune *a*b* matches any file whose actual name has an a somewhere before a b. But --prune-path *a*b* will also catch a file whose name contains a b and which sits inside a directory containing an a, or any file inside a directory of that form, and so on ๐
--exclude wildcardand--exclude-path wildcardโ these hide things from the index, but NOT from the scan ๐ If agedu finds a file or directory whose name matches the wildcard given to--exclude, that item won't be in the index. BUT, unlike--prune, if it's a directory, agedu will still scan its contents and index them, as long as they aren't ruled out by--excludeoptions themselves ๐ง
Same deal as before with --exclude-path: it works like --exclude, except the wildcard is matched against the entire pathname ๐ฆ
--include wildcardand--include-path wildcardโ the redemption arc ๐ These bring particular files or directories back into the index and the scan, if they'd previously been ruled out by one of the exclude or prune options. You can mix include, exclude and prune options in whatever order you like on the command line ๐ If more than one of them applies to the same file, the last one wins ๐
For example, if you only wanted to see how much disk space your MP3 files are taking up, you could run:
$ agedu -s . --exclude '*' --include '*.mp3'
That omits everything from the scan first, and then puts the MP3 files back in ๐ถ If you then only wanted a subset of those MP3s, you could exclude some of them again by adding, say, --exclude-path './queen/*'' (or, more efficiently, --prune ./queen) to the end of that command ๐ธ
Just like the previous two, --include-path is similar to --include, except the wildcard is matched against the entire pathname ๐
--progress,--no-progressand--tty-progressโ the progress vibe check ๐ When agedu is scanning a directory tree, it'll usually print a one-line progress report every second showing where it's got to, so you have some idea of how much longer it's gonna take โณ (It can't predict exactly how long, though, since it doesn't know which unscanned directories are secretly huge ๐)
By default, those reports show up on agedu's standard error channel, but only if that channel is pointing at a terminal device ๐ป If you want to take manual control, these three are your girls: --progress turns the reports on unconditionally, --no-progress turns them off unconditionally, and --tty-progress puts you back on the default behaviour, which depends on standard error being a terminal โจ
--dir-atimeand--no-dir-atimeโ the directory atime drama ๐ญ In normal operation, agedu ignores the atimes (last access times) on the directories it scans. It only pays attention to the atimes of the files inside those directories ๐ Why? Because directory atimes get reset constantly by all sorts of admin stuff, like cron jobs that scan the file system for one reason or another, or even other runs of agedu itself, though it tries really hard not to modify any atimes if it can ๐ค So the literal atimes on directories usually aren't a true reflection of how long ago the data was last accessed with real intent to use it ๐ญ
Instead, agedu makes up a fake atime for every directory it scans. It's equal to the newest atime of any file in or below that directory (or the directory's last modification time, whichever is newest) ๐ง The logic is that all the important accesses to directories are really accesses to the files inside them, so whenever a file is accessed, every directory on the path leading to it should count as accessed too ๐ค๏ธ
In unusual cases, a directory might actually hold important data that's accessed by reading the directory itself ๐ฅบ In that situation, agedu's atime-faking will misreport that directory as disused. If those directories make up a significant chunk of your disk usage, you might want to turn the faking off. That's what --dir-atime does: it makes the disk scan read the original atimes of the directories it scans ๐
The faking of directory atimes also needs an extra processing pass over the index file once the main disk scan is done. --dir-atime turns that pass off too ๐
โโ๏ธ So this option affects the -L option as well as -s and -S.
(The previous section mentioned that there might be subtle differences between the output of agedu -s /path -D and agedu -S /path. This is why. Doing a scan with -s and then dumping it with -D will dump the fully faked atimes on the directories, whereas doing a scan-to-dump with -S will dump only partially faked atimes, specifically each directory's last modification time, since the subsequent processing pass won't have had a chance to happen. However, loading either of the resulting dump files with -L will perform the atime-faking processing pass, leading to the same data in the index file in each case. In normal usage it should be safe to ignore all of this complexity. ๐ค)
--mtimeโ index files by their last modification time instead of their last access time ๐๏ธ You might want this if your last access times are totally useless for some reason. For example, if you recently searched every file on your system, the system would have lost all the info about which files you hadn't touched recently before that ๐ญ Using this is likely to be less effective at finding genuinely wasted space than the normal mode. It'll be more likely to flag things as disused when they're not, so you'll have more candidates to sift through by hand looking for data you don't need ๐ฅฒ But it may be better than nothing if your last-access times are unhelpful ๐ซ
Another use for this mode is finding recently created large data ๐ If your disk has been slowly filling up for years, the default mode will help you find unused data to delete. But if you know your disk had plenty of room recently and now it's suddenly full, and you suspect some rogue program left a big core dump or output file behind, then agedu --mtime might be a convenient way to track down the culprit ๐ต๏ธโโ๏ธ
--logicalsizeโ this tells agedu to treat each file's size as itslogicalsize, rather than the amount of space it actually eats up on disk ๐ (In other words, it usesst_sizeinstead ofst_blocksfrom the data returned bystat(2).) This makes agedu less accurate at reporting how much of your disk is used, but it might be useful in specialist cases, like working around a file system that's misreporting physical sizes ๐ง
For most files, the physical size is bigger than the logical size, because file system layouts generally allocate a whole number of disk blocks to each file, so some space gets wasted at the end of the last block ๐งฑ That means counting only the logical size will usually under-report disk usage, sometimes by a lot if you've got a huge pile of very small files ๐
On the other hand, a file with a very large logical size can sometimes have "holes" where no data is actually stored. In that case, using the logical size will over-report its disk usage ๐ So logical sizes can give wrong answers in both directions. Chaotic, I know ๐ช๏ธ
The following option affects all the modes that generate reports: the web server mode -w, the stand-alone HTML generation mode -H and the text report mode -t ๐ฃ
--filesโ this makes agedu's reports list the individual files in each directory, instead of just giving one combined report for everything that isn't in a subdirectory ๐โจ
The following option affects the text report mode -t ๐
-a ageor--age ageโ this tells agedu to only report files of at least the specified age ๐ฐ๏ธ An age is written as a number followed by one ofy(years),m(months),w(weeks) ord(days). This same syntax is also used by the-roption ๐ For example,-a 6mwill produce a text report that only includes files at least six months old ๐
okay so this next batch is for the stand-alone HTML generation mode -H and the text report mode -t ๐โจ these ones are lowkey the main character options ๐
-d depth,--depth depthโ this is the depth dial ๐๏ธ It controls how far down agedu digs when it makes a text or HTML report ๐- In text mode the default is
1, so your report includes the directory you gave on the command line plus all of its immediate subdirectories ๐ A depth of two adds another level below that, and so on ๐ช A depth of zero means only the directory on the command line ๐ซถ - In HTML mode, using this option switches agedu from making one single HTML file to making a bunch of files that link to each other ๐ธ๏ธ A depth of 1 means agedu writes an HTML file for the directory you gave plus one for each of its immediate subdirectories ๐ฆ
- Want agedu to recurse as deep as humanly possible? Give the special word
max'as the argument to-d๐
- In text mode the default is
-o filename,--output filenameโ this is where agedu drops its report ๐ฌ In text mode or single-file HTML mode, the argument is a file name ๐ In multiple-file HTML mode, the argument is a directory name instead ๐๏ธ agedu makes that directory if it doesn't already exist, and the output HTML files go inside it ๐
The following option affects only the stand-alone HTML generation mode -H, and even then, only in recursive mode (with -d):
--numericโ this one tells agedu to give most of its HTML files number names ๐ข The root of the whole output collection is stillindex.html, but everything else gets names like73.htmlor12525.html๐ง The numbers are basically arbitrary; they're actually indices of nodes in the data structure used by agedu's index file ๐ค- This naming style is less intuitive than the default of naming files after the sub-pathname they index ๐ It's also less stable: the same pathname won't necessarily get the same filename if you re-run
agedu -Hafter another scan of the same directory tree ๐ However, it keeps filenames short, so even if your directory tree is super deep, the output HTML files won't go over any OS limit on filename length โจ
- This naming style is less intuitive than the default of naming files after the sub-pathname they index ๐ It's also less stable: the same pathname won't necessarily get the same filename if you re-run
The following options affect the web server mode -w, and in some cases also the stand-alone HTML generation mode -H:
-r age range,--age-range age rangeโ this is the colour scale for how long ago stuff was last touched ๐ HTML reports use a range of colours to show how long ago data was last accessed, running from red (the most disused data) to green (the newest) ๐ด๐ข- By default, agedu picks the two ends of that spectrum by checking the data file to see what range of ages is in it ๐ But if you want your own limits, this is where
-rcomes in ๐ - The argument is a single age, or two ages separated by a minus sign ๐ซถ An age is a number followed by one of
y(years),m(months),w(weeks) ord(days) ๐ This syntax is also used by the-aoption ๐ - The first age is the oldest data and gets coloured red in the HTML ๐ด The second age is the newest and gets coloured green ๐ข If you don't give a second age, it defaults to zero, so green means data accessed just now โฐ
- Examples:
-r 2ymarks data red if it's been unused for two years or more, and green if it was accessed just now ๐-r 2y-3mmarks data red if it's been unused for two years or more, but marks it green if it was accessed three months ago or later ๐ธ
- By default, agedu picks the two ends of that spectrum by checking the data file to see what range of ages is in it ๐ But if you want your own limits, this is where
--address addr[:port]โ the network address and port number agedu listens on when it's running its web server ๐ If you want agedu to take connections from any source, give the address as the special valueANY๐ If you leave off the port number, agedu picks an arbitrary unused port for you and shows it ๐ฒ- If you use this option, agedu won't print its URL on standard output, since you're expected to already know the address you told it to listen on ๐
--auth auth-typeโ how agedu controls access to the web pages it serves ๐ Your options are:magicโ this one only works on Linux, and only when the connection comes from the same machine agedu is running on ๐ป On Linux, the special file/proc/net/tcplists the network connections the kernel currently knows about, including which user id created them ๐ So agedu looks up each incoming connection in that file and allows access if it comes from the same user id agedu itself is running under ๐ซถ That means in normal web server mode you can safely run it on a multi-user machine, and no other user will be able to read data out of your index file ๐basicโ uses HTTP Basic authentication, so the user has to provide a username and password via their browser ๐๏ธ agedu normally makes one up, but you can specify your own; see below ๐noneโ no authentication at all: anyone connecting has full access to the reports generated by agedu ๐ญ Don't do this unless there's nothing confidential in your index file, or you're certain nobody but you can run processes on your computer ๐ซdefaultโ the default if you don't pick one of the above ๐ agedu tries to use Linux magic authentication, but if it detects at startup that/proc/net/tcpis absent or non-functional, it falls back to HTTP Basic authentication and invents a user name and password ๐ช
--auth-file filename,--auth-fd fdโ when agedu is using HTTP Basic authentication, these let you pick your own user name and password ๐ With--auth-file, they're read from the file you specify; with--auth-fd, they're read from a given file descriptor that you should have arranged to pass to agedu ๐ Either way, the details should be the username, then a colon, then the password, followed immediately by end of file ๐ No trailing newline, or it'll be counted as part of the password ๐ฑ--title titleโ sets the string at the start of the<title>section of the output HTML pages ๐ท๏ธ The default isagedu, and it's followed by a colon and then the path you're viewing within the index file ๐ This is handy if you're serving agedu reports for several different servers and want it to be clear which one someone is looking at ๐ฅ๏ธ--launch shell-commandโ a command to run with the base URL of the web user interface, once the web server has started up ๐ It's interpreted by/bin/sh, and the base URL gets appended to it as an extra argument word โ- A typical use is
--launch=browse, which uses the XDGbrowsecommand to automatically open the agedu web interface in your default browser ๐ Other uses are possible too: for example, you could provide a command that passes the URL to some other software that will use it for something ๐ง
- A typical use is
--no-eofโ stops agedu in web server mode from looking for end-of-file on standard input and treating it as a signal to terminate ๐
โจ LIMITATIONS โจ
okay so the data file is pretty chunky ๐ The core of agedu is the tree-based data structure it uses in its index to efficiently perform the queries it needs, and this data structure requires O(N log N) storage ๐งฎ That's bigger than you might expect: a scan of my own home directory, with half a million files and directories and about 20Gb of data, produced an index file over 60Mb in size ๐ณ Furthermore, since the data file must be memory-mapped during most processing, it can never grow larger than available address space, so a really big filesystem may need to be indexed on a 64-bit computer ๐ป (This is one reason for the existence of the -D and -L options: you can do the scanning on the machine with access to the filesystem, and the indexing on a machine big enough to handle it ๐ง )
The data structure also doesn't usefully permit access control within the data file, so it would be difficult, even with a willingness to do additional coding, to run a system-wide agedu scan on a cron job and serve the right subset of reports to each user ๐ต
In certain circumstances, agedu can report false positives (reporting files as disused which are in fact in use) as well as the more benign false negatives (reporting files as in use which are not) ๐ป This arises when a file is, semantically speaking, read' without actually being physically read ๐ Typically this happens when a program checks whether the file's mtime has changed and only bothers re-reading it if it has; programs which do this include rsync(1) and make(1) ๐ Such programs fail to update the atime of unmodified files despite depending on their continued existence, so a directory full of such files will be reported as disused by agedu even in situations where deleting them will cause trouble ๐จ
Finally, of course, agedu's normal usage mode depends critically on the OS providing last-access times which are at least approximately right ๐ฏ
๐ซ So a file system mounted with Linux's noatime option, or the equivalent on any other OS, will not give useful results!
(However, the Linux mount option relatime, which distributions now tend to use by default, should be fine for all but specialist purposes: it reduces the accuracy of last-access times so that they might be wrong by up to 24 hours, but if you're looking for files that have been unused for months or years, that's not a problem ๐)
โจ LICENCE โจ
okay bestie, let's talk legal stuff ๐
agedu is free software ๐, and it's distributed under the MIT licence ๐. If you want to read the full licence text, just type agedu --licence ๐โจ
And that's the whole page, bestie! ๐ซถ Huge shoutout to Simon Tatham ๐, who wrote this one on 2008-11-02 ๐ธ, for agedu(1) ๐ฆ It's giving well-documented energy, periodt ๐
๐ฆ where this page comes from
- debian bookworm: agedu 20211129.8cd63c5-1 ยท MIT
- debian trixie: agedu 20211129.8cd63c5-1 ยท MIT
- ubuntu noble: agedu 20211129.8cd63c5-1 ยท MIT
- ubuntu resolute: agedu 20211129.8cd63c5-1build1 ยท MIT
- ubuntu stonking: agedu 20211129.8cd63c5-1build1 ยท MIT
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms