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 "use a customized header for listings/summaries"
53 string typestr="string"
56 This option can be used to print any string instead of the
57 default header line (which depends on the selected mode).
59 In user_list mode the header is a format string which allows
60 to include the uid and the user name in the header. See the
61 --format option for more details.
63 It is possible to set this to the empty string to suppress
64 the header completely. This is mostly useful to feed the
68 option "select-mode" m
69 #~~~~~~~~~~~~~~~~~~~~~
70 "How to print the results of the query"
72 values="user_summary","user_list","global_summary","global_list"
73 default="user_summary"
76 global_list: List of directories, regardless of owner.
77 global_summary: Only print totals.
78 user_list: Print a list for each admissible uid.
79 user_summary Print totals for each admissible uid.
84 "how to sort the user list or the global list"
86 values="size","file_count"
90 This option is ignored if select-mode is neither \"user_list\", nor
96 "file to write output to"
97 string typestr="<path>"
101 If empty, or not given, use stdout.
104 option "user-summary-sort" -
105 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
106 "how to sort the user-summary"
107 enum typestr="col_spec"
108 values="name","uid","dir_count","file_count","size"
112 It is enough to specify the first letter of the column specifier,
113 e.g. \"--user-summary-sort f\" sorts by file count.
116 option "print-base-dir" -
117 #~~~~~~~~~~~~~~~~~~~~~~~~
118 "whether to include the base-dir in the output"
121 If this flag is given, all directories printed are prefixed
122 with the base directory. The default is to print paths relative
128 "How to format the output"
129 string typestr="<format_string>"
133 A string that specifies how the output of the select query is
134 going to be formated. Depending on the chosen select-mode,
135 several conversion specifiers are available and a different
136 default value for this option applies.
138 adu knows four different types of directives: string, id,
139 count and size. These are explained in more detail below.
141 The general syntax for string and id directives is %(name:a:w)
142 where \"name\" is the name of the directive, \"a\" specifies
143 the alignment and \"w\" is the width specifier which allows
144 to give a field width.
146 The alignment specifier is a single character: Either \"l\",
147 \"r\", or \"c\" may be given to specify left, right and
148 centered alignment respectively. The with specifier is a
149 positive integer. Both \"a\" and \"w\" are optional.
151 A string directive supported by adu is \"dirname\" which is
152 substituted by the name of the directory. It is available
153 if either user_list or global_list mode was selected via
157 Print dirname without any padding:
161 Center dirname in a 20 chars wide field:
165 The other two types of directives, count and size, are used
166 for numbers. The syntax for these is %(name:a:w:u). The \"a\"
167 and the \"w\" specifier have the same meaning as for the string
168 and id directives. The additional \"u\" specifier selects a unit
169 in which the number that corresponds to the directive should
170 be formated. All three specifiers are optional.
172 Possible units are the characters of the set \" bkmgtBKMGT\"
173 specifying bytes, kilobytes, megabytes, gigabytes and
174 terabytes respectively. The difference between the lower and
175 the upper case variants is that the lower case specifiers
176 select 1024-based units while the upper case specifiers use
179 The whitespace character is like \"b\", but a space character
180 is printed instead of a unit.
182 Two more characters \"h\" and \"H\" (human-readable) are also
183 available that choose an appropriate unit depending on the
184 size of the number being printed.
186 An asterisk prepended to the unit specifier prevents the
187 unit from being printed. This is useful mainly for feeding
188 the output of adu to scripts that do not expect units.
190 In order to print a percent sign, use \"%%\". Moreover, adu
191 understands \"\\n\" and \"\\t\" and outputs a newline and a
192 tab character for these combinations respectively.
195 Print size in gigabytes right-aligned:
198 As before, but use 5 char wide field:
201 As before, but suppress trailing \"G\":
205 The following list contains all directives known to adu,
206 together with their types, and for which modes each of
209 pw_name (string): user name. Available for user_list,
210 user_summary and for the header in user_list mode.
212 uid (id): user id. Available for user_list,
213 user_summary and for the header in user_list mode.
215 files (count): number of files. Available for all
218 dirname (string): name of the directory. Available
219 for user_list and global_list.
221 size (size): total size/ directory size. Available
224 dirs (count): number of directories. Available
225 for user_summary and global_summary.