View Single Post
Old 08-06-2020, 09:49 PM   #58
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
Quote:
Originally Posted by haertig View Post
Taking the *.kepub example above, where your command line result said you have 7812 of those, can you tell us the exact command line that you used to come up with that number?
Sure, I posted the code two posts up. See
https://www.mobileread.com/forums/sh...1&postcount=55
Update:
I'll put it in spoilers here too:
Spoiler:
find -type f -name \*\.\* -printf '%f\0%s\n' | gawk '
BEGIN {
FS = "\0";
}
{
split($1, a, ".");
ext = tolower(a[length(a)]);
files[ext] += 1;
size[ext] += $2;
}
END {
PROCINFO["sorted_in"] = "@ind_str_asc";
for (ext in files) {
"numfmt --grouping " files[ext] | getline neatfiles
"numfmt --to=iec-i --suffix=B --format='%.1f' " size[ext] | getline neatsize
print "*." ext " " neatfiles " files, " neatsize;
}
}'
droopy is offline   Reply With Quote