]> git.tuebingen.mpg.de Git - adu.git/blob - select.ggo
Fix the user summary.
[adu.git] / select.ggo
1
2 option "uid" u
3 #~~~~~~~~~~~~~
4 "user id(s) to take into account"
5 string typestr="uid_spec"
6 optional
7 details="
8         An uid specifier may be a single number, or a range of uids.
9         Example:
10
11         --uid 42    # only consider uid 42
12         --uid 42-   # only consider uids greater or equal than 42
13         --uid 23-42 # only consider uids between 23 and 42, inclusively.
14         --uid 23-42,666-777,88 # consider uids 23-42, 666-777 and 88.
15 "
16
17 option "limit" L
18 #~~~~~~~~~~~~~~~
19 "Limit output"
20 int  typestr="num"
21 default="-1"
22 optional
23 details="
24         Only print num lines of output. If negative (the default),
25         print all lines.
26 "
27
28 option "no-headers" -
29 #~~~~~~~~~~~~~~~~~~~~
30 "supress descriptions for listings/tables"
31 flag off
32 details="
33         This is mostly useful to feed the output of adu to scripts.
34 "
35
36 option "select-mode" m
37 #~~~~~~~~~~~~~~~~~~~~~
38 "How to print the results of the query"
39 enum typestr="<key>"
40 values="global_list","global_summary","user_list","user_summary"
41 default="global_list"
42 optional
43 details="
44         global_list: List of directories, regardless of owner.
45         global_summary: Only print totals.
46         user_list: Print a list for each admissible uid.
47         user_summary Print totals for each admissible uid.
48 "
49
50 option "list-sort" s
51 #~~~~~~~~~~~~~~~~~~~
52 "how to sort the user list or the global list"
53 enum typestr="<key>"
54 values="size","file_count"
55 default="size"
56 optional
57 details="
58         This option is ignored if select-mode is neither \"user_list\", nor
59         \"global_list\".
60 "
61
62 option "output" o
63 #~~~~~~~~~~~~~~~~
64 "file to write output to"
65 string typestr="<path>"
66 optional
67 default="-"
68 details="
69         If empty, or not given, use stdout.
70 "
71
72 option "size-unit" -
73 #~~~~~~~~~~~~~~~~~~~
74 "select output format for sizes"
75 enum typestr="format"
76 values="h","b","k","m","g","t"
77 default="h"
78 optional
79 details="
80         Print sizes in the given unit: human-readable, bytes,
81         kilobytes (2^10), megabytes (2^20), gigabytes (2^30), terabytes
82         (2^40). The default is \"h\", i.e. human-readable.
83 "
84
85 option "count-unit" -
86 #~~~~~~~~~~~~~~~~~~~~
87 "select output format for counted values"
88 enum typestr="format"
89 values="h","n","k","m","g","t"
90 default="h"
91 optional
92 details="
93         Print the number of files/directories in the given unit:
94         human-readable, number, number/10^3, number/10^6, number/10^12,
95         number/10^15. The default is to print numbers in human-readable
96         format.
97 "
98
99
100 option "user-summary-sort" -
101 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
102 "how to sort the user-summary"
103 enum typestr="col_spec"
104 values="name","uid","dir_count","file_count","size"
105 default="size"
106 optional
107 details="
108         It is enough to specify the first letter of the column specifier,
109         e.g. \"--user-summary-sort f\" sorts by file count.
110 "
111
112 option "no-user-summary" -
113 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
114 "do not print the user summary table"
115 flag off
116
117
118 option "user-list" -
119 #~~~~~~~~~~~~~~~~~~~
120 "how to print per-user directory listings"
121 enum typestr="which"
122 values="size","file_count","both","none"
123 default="both"
124 optional
125 details="
126         Similar to the global directory listings mentioned above,
127         adu can print two directory listings per user. This option
128         controls which of the these should be printed.
129 "
130 option "no-global-summary" -
131 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
132 "do not print the summary line"
133 flag off
134
135 option "global-list" -
136 #~~~~~~~~~~~~~~~~~~~~~
137 "how to print global directory listings"
138 enum typestr="which"
139 values="size","file_count","both","none"
140 default="both"
141 optional
142 details="
143         By default adu prints two global directory listings: The
144         first prints the directory names ordered by the sum of the
145         sizes of the contained files while the second listing prints
146         them sorted by the number of files. This option can be used
147         to print only one or neither of these two listings.
148 "
149 option "print-base-dir" -
150 #~~~~~~~~~~~~~~~~~~~~~~~~
151 "whether to include the base-dir in the output"
152 flag off
153 details="
154         If this flag is given, all directories printed are prefixed
155         with the base directory. The default is to print paths relative
156         to the base dir.
157 "
158
159 ########################
160 section "Format strings"
161 ########################
162
163 option "global-list-format" -
164 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165 "How to format the global list"
166 string typestr="<format>"
167 default="%(size:r:8) %(files:r:8) %(dirname)\n"
168 details="
169         size: Total size of all files
170         files: The number of files
171         dirname: The name of the directory
172 "
173
174 optional
175 option "global-summary-format" -
176 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177 "How to format the global summary"
178 string typestr="<format>"
179 default="#directories: %(dirs), #files: %(files), size: %(size)\n\n"
180 details="
181         dirs: The number of directories
182         files: The number of files
183         size: Total size of all files
184 "
185 optional
186
187 option "user-summary-format" -
188 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
189 "How to format the user summary"
190 string typestr="<format>"
191 default="%(pw_name:l:16) %(uid:r:5) %(dirs:r:5) %(files:r:5) %(size:r:5)\n"
192 details="
193         pw_name: The user name
194         uid: The user id
195         dirs: The number of directories
196         files: The number of files
197         size: Total size of all files
198 "
199 optional