3 "users to take into account"
4 string typestr="user_name"
8 This option may be given multiple times in which case all given
9 user names are considered admissible. See also --uid below.
14 "user id(s) to take into account"
15 string typestr="uid_spec"
18 An uid specifier may be a single uid, a range of uids,
19 or a comma-separated list of single uids or ranges.
25 Only consider uids greater or equal than 42:
28 Only consider uids between 23 and 42, inclusively:
31 Consider uids 23-42, 666-777 and 88:
32 --uid 23-42,666-777,88
34 If no --user option is given and also --uid option is not given
35 (the default), all users are taken into account.
45 Only print num lines of output. If negative (the default),
46 print all lines. This option is honored in all select modes
47 except global_summary (which outputs only one single line).
52 "only consider matching directories"
53 string typestr="regex"
56 Regular expression that must match the directory name for
57 the directory to be considered for the output of the query.
58 See regex(7) for details.
60 Depending on whether --print-base-dir is given, the absolute
61 directory name or only the part of the directory name below
62 the base directory is matched against \"regex\".
64 If this option is not given (the default) all directories
65 are taken into account.
67 If \"regex\" starts with '!', directories are matched against
68 the remaining part of \"regex\" and the sense of matching is
74 "use a customized header for listings/summaries"
75 string typestr="string"
78 This option can be used to print any string instead of the
79 default header line (which depends on the selected mode).
81 In user_list mode the header is a format string which allows
82 to include the uid and the user name in the header. See the
83 --format option for more details.
85 It is possible to set this to the empty string to suppress
86 the header completely. This is mostly useful to feed the
92 "use a customized trailer for listings/summaries"
93 string typestr="string"
97 This option can be used to print any string at the end of
100 In user_list mode the trailer is a format string with the
101 same semantics like the header string.
104 option "select-mode" m
105 #~~~~~~~~~~~~~~~~~~~~~
106 "How to print the results of the query"
108 values="user_summary","user_list","global_summary","global_list"
109 default="user_summary"
112 user_summary: Print totals for each admissible uid.
113 user_list: Print a list for each admissible uid.
114 global_summary: Only print totals.
115 global_list: List of directories, regardless of owner.
120 "how to sort the user list or the global list"
122 values="size","file_count"
126 This option is ignored if select-mode is neither \"user_list\", nor
132 "file to write output to"
133 string typestr="path"
137 If empty, or not given, use stdout. The following conventions
138 cause the output to be written differently:
140 An output file name of \"-\" means stdout.
142 \"path\" may be prepended by '>' which instructs adu to
143 truncate the output file to length zero. If \"path\" does
144 not start with '>' and \"path\" already exists, the select
145 query is being aborted. Otherwise, \"path\" is created and
146 output is written to \"path\".
148 If the first two characters of \"path\" are '>', the output
149 file (given by removing the leading \">>\" from \"path\")
150 is being opened in append mode. It is no error if the output
151 file does not exist but, as above, the output file name \">>\"
152 is considered invalid.
154 If the first character of \"path\" is '|', a pipe is created
155 and the rest of \"path\" is being executed with its standard in
156 redirected to the reading end of the pipe. The output of adu
157 is written to the writing end of the pipe. Again, specifying
158 only \"|\" is considered invalid and causes an error.
161 option "user-summary-sort" -
162 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 "how to sort the user-summary"
164 enum typestr="col_spec"
165 values="name","uid","dir_count","file_count","size"
169 It is enough to specify the first letter of the column specifier,
170 e.g. \"--user-summary-sort f\" sorts by file count.
173 option "print-base-dir" -
174 #~~~~~~~~~~~~~~~~~~~~~~~~
175 "whether to include the base-dir in the output"
178 If this flag is given, all directories printed are prefixed
179 with the base directory. The default is to print paths relative
185 "How to format the output"
186 string typestr="<format_string>"
190 A string that specifies how the output of the select query is
191 going to be formated. Depending on the chosen select-mode,
192 several conversion specifiers are available and a different
193 default value for this option applies.
195 adu knows four different types of directives: string, id,
196 count and size. These are explained in more detail below.
198 The general syntax for string and id directives is %(name:a:w)
199 where \"name\" is the name of the directive, \"a\" specifies
200 the alignment and \"w\" is the width specifier which allows
201 to give a field width.
203 The alignment specifier is a single character: Either \"l\",
204 \"r\", or \"c\" may be given to specify left, right and
205 centered alignment respectively. The with specifier is a
206 positive integer. Both \"a\" and \"w\" are optional.
208 A string directive supported by adu is \"dirname\" which is
209 substituted by the name of the directory. It is available
210 if either user_list or global_list mode was selected via
214 Print dirname without any padding:
218 Center dirname in a 20 chars wide field:
222 The other two types of directives, count and size, are used
223 for numbers. The syntax for these is %(name:a:w:u). The \"a\"
224 and the \"w\" specifier have the same meaning as for the string
225 and id directives. The additional \"u\" specifier selects a unit
226 in which the number that corresponds to the directive should
227 be formated. All three specifiers are optional.
229 Possible units are the characters of the set \" bkmgtBKMGT\"
230 specifying bytes, kilobytes, megabytes, gigabytes and
231 terabytes respectively. The difference between the lower and
232 the upper case variants is that the lower case specifiers
233 select 1024-based units while the upper case specifiers use
236 The whitespace character is like \"b\", but a space character
237 is printed instead of a unit.
239 Two more characters \"h\" and \"H\" (human-readable) are also
240 available that choose an appropriate unit depending on the
241 size of the number being printed.
243 An asterisk prepended to the unit specifier prevents the
244 unit from being printed. This is useful mainly for feeding
245 the output of adu to scripts that do not expect units.
247 In order to print a percent sign, use \"%%\". Moreover, adu
248 understands \"\\n\" and \"\\t\" and outputs a newline and a
249 tab character for these combinations respectively.
252 Print size in gigabytes right-aligned:
255 As before, but use 5 char wide field:
258 As before, but suppress trailing \"G\":
262 The following list contains all directives known to adu,
263 together with their types, and for which modes each of
266 pw_name (string): user name. Available for user_list,
267 user_summary and for the header in user_list mode.
269 uid (id): user id. Available for user_list,
270 user_summary and for the header in user_list mode.
272 files (count): number of files. Available for all
275 dirname (string): name of the directory. Available
276 for user_list and global_list.
278 size (size): total size/ directory size. Available
281 dirs (count): number of directories. Available
282 for user_summary and global_summary.