4 "user id(s) to take into account"
5 string typestr="uid_spec"
8 An uid specifier may be a single number, or a range of uids.
14 Only consider uids greater or equal than 42:
17 Only consider uids between 23 and 42, inclusively:
20 Consider uids 23-42, 666-777 and 88:
21 --uid 23-42,666-777,88
31 Only print num lines of output. If negative (the default),
37 "suppress descriptions for listings/summaries"
40 This is mostly useful to feed the output of adu to scripts.
43 option "select-mode" m
44 #~~~~~~~~~~~~~~~~~~~~~
45 "How to print the results of the query"
47 values="global_list","global_summary","user_list","user_summary"
51 global_list: List of directories, regardless of owner.
52 global_summary: Only print totals.
53 user_list: Print a list for each admissible uid.
54 user_summary Print totals for each admissible uid.
59 "how to sort the user list or the global list"
61 values="size","file_count"
65 This option is ignored if select-mode is neither \"user_list\", nor
71 "file to write output to"
72 string typestr="<path>"
76 If empty, or not given, use stdout.
79 option "user-summary-sort" -
80 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
81 "how to sort the user-summary"
82 enum typestr="col_spec"
83 values="name","uid","dir_count","file_count","size"
87 It is enough to specify the first letter of the column specifier,
88 e.g. \"--user-summary-sort f\" sorts by file count.
91 option "print-base-dir" -
92 #~~~~~~~~~~~~~~~~~~~~~~~~
93 "whether to include the base-dir in the output"
96 If this flag is given, all directories printed are prefixed
97 with the base directory. The default is to print paths relative
103 "How to format the output"
104 string typestr="<format_string>"
108 A string that specifies how the output of the select query is
109 going to be formated. Depending on the chosen select-mode,
110 several conversion specifiers are available and a different
111 default value for this option applies.
113 adu knows four different types of directives: string, id,
114 count and size. These are explained in more detail below.
116 The general syntax for string and id directives is %(name:a:w)
117 where \"name\" is the name of the directive, \"a\" specifies
118 the alignment and \"w\" is the width specifier which allows
119 to give a field width.
121 The alignment specifier is a single character: Either \"l\",
122 \"r\", or \"c\" may be given to specify left, right and
123 centered alignment respectively. The with specifier is a
124 positive integer. Both \"a\" and \"w\" are optional.
126 A string directive supported by adu is \"dirname\" which is
127 substituted by the name of the directory. It is available
128 if either user_list or global_list mode was selected via
132 Print dirname without any padding:
136 Center dirname in a 20 chars wide field:
140 The other two types of directives, count and size, are used
141 for numbers. The syntax for these is %(name:a:w:u). The \"a\"
142 and the \"w\" specifier have the same meaning as for the string
143 and id directives. The additional \"u\" specifier selects a unit
144 in which the number that corresponds to the directive should
145 be formated. All three specifiers are optional.
147 Possible units are the characters of the set \" bkmgtBKMGT\"
148 specifying bytes, kilobytes, megabytes, gigabytes and
149 terabytes respectively. The difference between the lower and
150 the upper case variants is that the lower case specifiers
151 select 1024-based units while the upper case specifiers use
154 The whitespace character is like \"b\", but a space character
155 is printed instead of a unit.
157 Two more characters \"h\" and \"H\" (human-readable) are also
158 available that choose an appropriate unit depending on the
159 size of the number being printed.
161 An asterisk prepended to the unit specifier prevents the
162 unit from being printed. This is useful mainly for feeding
163 the output of adu to scripts that do not expect units.
165 In order to print a percent sign, use \"%%\". Moreover, adu
166 understands \"\\n\" and \"\\t\" and outputs a newline and a
167 tab character for these combinations respectively.
170 Print size in gigabytes right-aligned:
173 As before, but use 5 char wide field:
176 As before, but suppress trailing \"G\":
180 The following list contains all directives known to adu,
181 together with their types, and for which modes each of
184 pw_name (string): user name. Available for user_list
187 uid (id): user id. Available for user_list and
190 files (count): number of files. Available everywhere.
192 dirname (string): name of the directory. Available
193 for user_list and global_list.
195 size (size): total size/ directory size. Available
198 dirs (count): number of directories. Available
199 for user_summary and global_summary.