Anton Aylward wrote:
On 20/01/18 02:01 PM, Carlos E. R. wrote:
I just joined my 5 remaining reiserfs running partitions into a single one: three of them were contiguous. I put the contents of 4 of them in the same partitions and did bind mounts on the directories. The 5th I converted to ext4.
I keep thus a single large reiserfs partitions because it has a lot of small files. For instance, one of the partitions had more than 600000 files in 1.5 GB.
I have a one-line script that tells me the distribution of file sizes, in base two increments. If anyone wasn't to adjust for other granularity or a fixed array of size, I'd be pleased to see the result.
Here is the one liner:
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> 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 :-) -- Per Jessen, Zürich (7.2°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org