On Monday 12 of July 2010, auxsvr@gmail.com wrote:
On Monday 12 of July 2010, Anton Aylward wrote:
What I want is something that give me a distribution - table by range or table by files below a given size - of the file sizes, not in a single directory but in a tree.
In R (package R-base) try the following:
strtoi(system("find DIR -type f -exec du {} \\; | awk '{print $1}'", intern=T)) -> fs_sizes barplot(table(cut(fs_sizes, breaks=c(0,2^(1:27)) )))
(replace DIR with the directory you want) to display a bar plot with the categories corresponding to the ones in the article you link to. It is trivial to do further statistical analysis in R.
Regards, Peter
I posted too soon. Here's the version that displays byte count instead of block count: strtoi(system("find DIR -type f -exec du -b {} \\; | awk '{print $1}'", intern=T)) -> fs_sizes This may overestimate disk usage of sparse files (man du). Regards, Peter -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org