Per, et al -- ...and then Per Jessen said... % % Anton Aylward wrote: % ... % > find . -xdev -type f -print0 | xargs -0 ls -l | \ % > awk '{size[int(log($5)/log(2))]++}\ % > END{for (i in size) printf("%10d %3d\n", 2^i, size[i])}' | \ % > sort -n % % <nitpicking> % four lines in a one-liner? % </nitpicking> *grin* % % You could shorten it to a three lines: % % find . -xdev -type f -ls | awk '{size[int(log($7)/log(2))]++}\ % END{for (i in size) printf("%10d %3d\n", 2^i, size[i])}' | \ % sort -n That was a nice touch, since we're playing there. I don't use -ls much since there are so crazy many fields, and I really should try the printf options I've just learned here. But ... The nice thing about -print0 is that it gets past ugly characters. Your version will break if you have a filename with (ew) a newline embedded, right? HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org