]> git.tuebingen.mpg.de Git - adu.git/blob - adu.1.inc
manual: Add example for interactive mode.
[adu.git] / adu.1.inc
1 [NAME]
2 adu \- advanced disk usage
3 [EXAMPLES]
4
5 .PP
6 The following example creates a database containing the disk usage
7 patterns of the /var directory:
8 .IP
9         $ adu --create --database-dir /root/adu-var --base-dir /var
10
11 .PP
12 Here's a simple query that uses the newly created database to print
13 the user-summary:
14 .IP
15         $ adu --select --database-dir /root/adu-var
16 .PP
17 To print the one-line global summary instead, use
18 .IP
19         $ adu --select --database-dir /root/adu-var --select-options '--select-mode global_summary'
20 .PP
21 To sort the user summary by file count rather than by file size, run
22 .IP
23         $ adu --select --database-dir /root/adu-var --select-options '--list-sort=file_count'
24 .PP
25 The command below prints the five largest directories of the users root and
26 mysql:
27 .IP
28         $ adu --select --database-dir /root/adu-var --select-options '--select-mode user_list --user root --user mysql --limit 5'
29 .PP
30 The same, using short options:
31 .IP
32         $ adu -Sd /root/adu-var -s '-m user_list -u root -u mysql -l 5'
33 .PP
34 Again the same, but omitting /var/cache:
35 .IP
36         $ adu -Sd /root/adu-var -s '-m user_list -u root -u mysql -l 5 -p !^cache/'
37 .PP
38 A simple script for interactive mode:
39
40 .EX
41         set -m user_list
42         set -u root
43         set -o file-list.root
44         run
45         reset
46         set -m user_list
47         set -u mysql
48         set -o file-list.mysql
49         run
50 .EE
51 .PP
52 Run adu in interactive mode with the above script (adu-script.txt):
53 .IP
54         $ adu -Id /root/adu-var < adu-script.txt
55
56 [SEE ALSO]
57 .BR du (1)