X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=blobdiff_plain;f=select.ggo;h=b0b1daa6f007c5e13958ca799a7d6e32dec8b206;hp=10c760e9889c6e699b938e08b8b1b686324e2f01;hb=1231699dcaf1e96aabe33ef621aedecec83a5ccd;hpb=b01ff57775258c8df4c486b0962fc67cfdfef439 diff --git a/select.ggo b/select.ggo index 10c760e..b0b1daa 100644 --- a/select.ggo +++ b/select.ggo @@ -4,7 +4,6 @@ option "uid" u "user id(s) to take into account" string typestr="uid_spec" optional -multiple details=" An uid specifier may be a single number, or a range of uids. Example: @@ -12,9 +11,7 @@ details=" --uid 42 # only consider uid 42 --uid 42- # only consider uids greater or equal than 42 --uid 23-42 # only consider uids between 23 and 42, inclusively. - - This option may be given multiple times. An uid is taken into - account if it satisfies at least one --uid option. + --uid 23-42,666-777,88 # consider uids 23-42, 666-777 and 88. " option "limit" L @@ -36,6 +33,20 @@ details=" This is mostly useful to feed the output of adu to scripts. " +option "select-mode" m +#~~~~~~~~~~~~~~~~~~~~~ +"How to print the results of the query" +enum typestr="" +values="global_list","global_summary","user_list","user_summary" +default="global_list" +optional +details=" + global_list: List of directories, regardless of owner. + global_summary: Only print totals. + user_list: Print a list for each admissible uid. + user_summary Print totals for each admissible uid. +" + option "sort" s #~~~~~~~~~~~~~~~ "how to sort the output" @@ -47,20 +58,6 @@ details=" Sort by file size, file count or unsorted. " -option "format" f -#~~~~~~~~~~~~~~~~~ -"how to format the output" -string typestr="" -optional -details=" - %(basedir) -- the path given to --base-dir during create - %(dir) -- the name of the directory - %(dir_size) -- the size of the sum of all regular files in this directory - %(num_files) -- the number of regular files in this directory - %% -- interpolates to % - %xx -- interpolates to the character with hex code xx -" - option "output" o #~~~~~~~~~~~~~~~~ "file to write output to" @@ -70,3 +67,132 @@ default="-" details=" If empty, or not given, use stdout. " + +option "size-unit" - +#~~~~~~~~~~~~~~~~~~~ +"select output format for sizes" +enum typestr="format" +values="h","b","k","m","g","t" +default="h" +optional +details=" + Print sizes in the given unit: human-readable, bytes, + kilobytes (2^10), megabytes (2^20), gigabytes (2^30), terabytes + (2^40). The default is \"h\", i.e. human-readable. +" + +option "count-unit" - +#~~~~~~~~~~~~~~~~~~~~ +"select output format for counted values" +enum typestr="format" +values="h","n","k","m","g","t" +default="h" +optional +details=" + Print the number of files/directories in the given unit: + human-readable, number, number/10^3, number/10^6, number/10^12, + number/10^15. The default is to print numbers in human-readable + format. +" + + +option "user-summary-sort" - +#~~~~~~~~~~~~~~~~~~~~~~~~~~~ +"how to sort the user-summary" +enum typestr="col_spec" +values="name","uid","dir_count","file_count","size" +default="size" +optional +details=" + It is enough to specify the first letter of the column specifier, + e.g. \"--user-summary-sort f\" sorts by file count. +" + +option "no-user-summary" - +#~~~~~~~~~~~~~~~~~~~~~~~~~~~ +"do not print the user summary table" +flag off + + +option "user-list" - +#~~~~~~~~~~~~~~~~~~~ +"how to print per-user directory listings" +enum typestr="which" +values="size","file_count","both","none" +default="both" +optional +details=" + Similar to the global directory listings mentioned above, + adu can print two directory listings per user. This option + controls which of the these should be printed. +" +option "no-global-summary" - +#~~~~~~~~~~~~~~~~~~~~~~~~~~~ +"do not print the summary line" +flag off + +option "global-list" - +#~~~~~~~~~~~~~~~~~~~~~ +"how to print global directory listings" +enum typestr="which" +values="size","file_count","both","none" +default="both" +optional +details=" + By default adu prints two global directory listings: The + first prints the directory names ordered by the sum of the + sizes of the contained files while the second listing prints + them sorted by the number of files. This option can be used + to print only one or neither of these two listings. +" +option "print-base-dir" - +#~~~~~~~~~~~~~~~~~~~~~~~~ +"whether to include the base-dir in the output" +flag off +details=" + If this flag is given, all directories printed are prefixed + with the base directory. The default is to print paths relative + to the base dir. +" + +######################## +section "Format strings" +######################## + +option "global-list-format" - +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +"How to format the global list" +string typestr="" +default="%(size:r:8) %(files:r:8) %(dirname)\n" +details=" + size: Total size of all files + files: The number of files + dirname: The name of the directory +" + +optional +option "global-summary-format" - +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +"How to format the global summary" +string typestr="" +default="#directories: %(dirs), #files: %(files), size: %(size)\n\n" +details=" + dirs: The number of directories + files: The number of files + size: Total size of all files +" +optional + +option "user-summary-format" - +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +"How to format the user summary" +string typestr="" +default="%(pw_name:l:16) %(uid:r:5) %(dirs:r:5) %(files:r:5) %(size:r:5)\n" +details=" + pw_name: The user name + uid: The user id + dirs: The number of directories + files: The number of files + size: Total size of all files +" +optional