We have a set of directories containing lucene indexes. Each index is a mix of different file types (differentiated by extension) eg:
0/index/_2z6.frq
0/index/_2z6.fnm
..
1/index/_1sq.frq
1/index/_1sq.fnm
..
(it's about 10 different extensions)
We'd like to get a total by file extension, eg:
.frq 21234
.fnm 34757
..
I've tried various combinations of du/awk/xargs but finding it tricky to do exactly this.
Best Answer
For any given extension you an use
to get the total file size for that type.
And after some thinking
Which will output the size in bytes of each file type found.