Merge commit 'fml/master'
[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 "sort" s
37 #~~~~~~~~~~~~~~~
38 "how to sort the output"
39 enum typestr="<key>"
40 values="sizes","files","unsorted"
41 default="sizes"
42 optional
43 details="
44 Sort by file size, file count or unsorted.
45 "
46
47 option "format" f
48 #~~~~~~~~~~~~~~~~~
49 "how to format the output"
50 string typestr="<format>"
51 optional
52 details="
53 %(basedir) -- the path given to --base-dir during create
54 %(dir) -- the name of the directory
55 %(dir_size) -- the size of the sum of all regular files in this directory
56 %(num_files) -- the number of regular files in this directory
57 %% -- interpolates to %
58 %xx -- interpolates to the character with hex code xx
59 "
60
61 option "output" o
62 #~~~~~~~~~~~~~~~~
63 "file to write output to"
64 string typestr="<path>"
65 optional
66 default="-"
67 details="
68 If empty, or not given, use stdout.
69 "
70
71 option "size-unit" -
72 #~~~~~~~~~~~~~~~~~~~
73 "select output format for sizes"
74 enum typestr="format"
75 values="h","b","k","m","g","t"
76 default="h"
77 optional
78 details="
79 Print sizes in the given unit: human-readable, bytes,
80 kilobytes (2^10), megabytes (2^20), gigabytes (2^30), terabytes
81 (2^40). The default is \"h\", i.e. human-readable.
82 "
83
84 option "count-unit" -
85 #~~~~~~~~~~~~~~~~~~~~
86 "select output format for counted values"
87 enum typestr="format"
88 values="h","n","k","m","g","t"
89 default="h"
90 optional
91 details="
92 Print the number of files/directories in the given unit:
93 human-readable, number, number/10^3, number/10^6, number/10^12,
94 number/10^15. The default is to print numbers in human-readable
95 format.
96 "
97
98
99 option "user-summary-sort" -
100 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 "how to sort the user-summary"
102 enum typestr="col_spec"
103 values="name","uid","dir_count","file_count","size"
104 default="size"
105 optional
106 details="
107 It is enough to specify the first letter of the column specifier,
108 e.g. \"--user-summary-sort f\" sorts by file count.
109 "
110
111 option "no-user-summary" -
112 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
113 "do not print the user summary table"
114 flag off
115
116
117 option "user-list" -
118 #~~~~~~~~~~~~~~~~~~~
119 "how to print per-user directory listings"
120 enum typestr="which"
121 values="size","file_count","both","none"
122 default="both"
123 optional
124 details="
125 Similar to the global directory listings mentioned above,
126 adu can print two directory listings per user. This option
127 controls which of the these should be printed.
128 "
129 option "no-global-summary" -
130 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
131 "do not print the summary line"
132 flag off
133
134 option "global-list" -
135 #~~~~~~~~~~~~~~~~~~~~~
136 "how to print global directory listings"
137 enum typestr="which"
138 values="size","file_count","both","none"
139 default="both"
140 optional
141 details="
142 By default adu prints two global directory listings: The
143 first prints the directory names ordered by the sum of the
144 sizes of the contained files while the second listing prints
145 them sorted by the number of files. This option can be used
146 to print only one or neither of these two listings.
147 "
148 option "print-base-dir" -
149 #~~~~~~~~~~~~~~~~~~~~~~~~
150 "whether to include the base-dir in the output"
151 flag off
152 details="
153 If this flag is given, all directories printed are prefixed
154 with the base directory. The default is to print paths relative
155 to the base dir.
156 "