1 # Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
3 # Licensed under the GPL v2. For licencing details see COPYING.
8 adu creates a database containing disk usage statistics of a given
9 directory. It allows to query that database to quickly retrieve
10 usage patterns of subdirectories and/or files owned by a given user id.
13 #########################
14 section "General options"
15 #########################
17 option "database-dir" d
18 #~~~~~~~~~~~~~~~~~~~~~~
19 "directory containing the osl tables"
23 Full path to the directory containing the osl tables. This
24 directory must exist. It must be writable for the user running
25 adu in --create mode and readable in --select mode.
35 Log messages are always written to stderr while normal output
36 goes to stdout. Lower values mean more verbose logging.
46 adu may be started in one of three possible modes, each of
47 which corresponds to a different command line option. Exactly
48 one of these options must be given.
53 groupoption "create" C
54 #~~~~~~~~~~~~~~~~~~~~~
55 "Create a new database"
58 Traverse the given directory and track disk usage on a
59 per-user basis. Results are stored in N + 1 osl tables where
60 N is the number of uids that own at least one regular file
64 groupoption "interactive" I
65 #~~~~~~~~~~~~~~~~~~~~~~~~~~
66 "activate interactive mode"
69 In this mode, adu reads commands from stdin. This makes it
70 possible to run different select queries without opening the
71 underlying osl database for each query (which is expensive).
73 In interactive mode, several subcommands are available, see
74 the end of this document.
77 groupoption "select" S
78 #~~~~~~~~~~~~~~~~~~~~~
79 "query a database previously created with --create"
82 This option prints statistics about matching subdirectories
83 to stdout, to an output file or pipes the output to a given
84 command, depending on the --output option. The output format
85 can be customized by specifying select options, see below.
88 ##############################
89 section "Options for --create"
90 ##############################
94 "directory to traverse"
99 The base directory to be traversed recursively. A warning
100 message is printed for each subdirectory that could not be
101 read because of insufficient permissions. These directories
102 will be ignored when computing statistics.
105 option "one-file-system" x
106 #~~~~~~~~~~~~~~~~~~~~~~~~~
107 "do not dive into other file systems"
111 Skip directories that are on different file systems from the
112 one that the argument being processed is on.
115 option "hash-table-bits" -
116 #~~~~~~~~~~~~~~~~~~~~~~~~~
117 "specify the size of the uid hash table"
123 Use a hash table of size 2^num for the uid entries. If more than
124 2^num different uids own at least one regular file under base-dir,
125 the command fails. Increase this value if you have more than 1024
126 users. Decreasing the value causes adu to use slightly less memory.
129 ##############################
130 section "Options for --select"
131 ##############################
133 option "select-options" s
134 #~~~~~~~~~~~~~~~~~~~~~~~~~
135 "Options for select mode"
136 string typestr="<options>"
140 This option takes a string whose content is another set of
141 options as described below. Select options may be specified
142 either directly in select mode, in which case you have use
143 quotes to prevent the select options from being interpreted
144 as adu options, or via the \"set\" command in interactive mode.