X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=adu.1.inc;h=4cf6fcdaa22d48cc388455fb001fd2255776b5bf;hb=599cc210028d11e60bee2bad0721a6b20f3a26d6;hp=9faf62d1d3426f5b45e2823287a08f5ea6e67c40;hpb=d46cd1bca47e94e62ef558973a69761a729f298e;p=adu.git diff --git a/adu.1.inc b/adu.1.inc index 9faf62d..4cf6fcd 100644 --- a/adu.1.inc +++ b/adu.1.inc @@ -1,4 +1,56 @@ [NAME] adu \- advanced disk usage +[EXAMPLES] + +.PP +The following example creates a database containing the disk usage +patterns of the /var directory: +.IP + $ adu --create --database-dir /root/adu-var --base-dir /var +.PP +Here's a simple query that uses the newly created database to print +the user-summary: +.IP + $ adu --select --database-dir /root/adu-var +.PP +To print the one-line global summary instead, use +.IP + $ adu --select --database-dir /root/adu-var --select-options '--select-mode global_summary' +.PP +To sort the user summary by file count rather than by file size, run +.IP + $ adu --select --database-dir /root/adu-var --select-options '--list-sort=file_count' +.PP +The command below prints the five largest directories of the users root and +mysql: +.IP + $ adu --select --database-dir /root/adu-var --select-options '--select-mode user_list --user root --user mysql --limit 5' +.PP +The same, using short options: +.IP + $ adu -Sd /root/adu-var -s '-m user_list -u root -u mysql -l 5' +.PP +Again the same, but omitting /var/cache: +.IP + $ adu -Sd /root/adu-var -s '-m user_list -u root -u mysql -l 5 -p !^cache/' +.PP +A simple script for interactive mode: + +.EX + set -m user_list + set -u root + set -o file-list.root + run + reset + set -m user_list + set -u mysql + set -o file-list.mysql + run +.EE +.PP +Run adu in interactive mode with the above script (adu-script.txt): +.IP + $ adu -Id /root/adu-var < adu-script.txt + [SEE ALSO] .BR du (1)