Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: how to find average file size

  • Subject: Re: how to find average file size
  • From: Roy Schestowitz <newsgroups@xxxxxxxxxxxxxxx>
  • Date: Sun, 15 Jan 2006 19:57:09 +0000
  • Newsgroups: comp.os.linux.misc
  • Organization: schestowitz.com / MCC / Manchester University
  • References: <1137354491.102292.87420@g43g2000cwa.googlegroups.com>
  • Reply-to: newsgroups@xxxxxxxxxxxxxxx
  • User-agent: KNode/0.7.2
__/ [jim.frantzen@xxxxxxxxx] on Sunday 15 January 2006 19:48 \__

> I have a reiserFS under Mandrake with a directory, full of sub
> directories, in total containing 15 million small image files (between
> 1k and 10k).
> 
> How can I find the average file size?

Go to the parent directory

'du -sh' gives you the size of all files therein

'find . -type f | wc -l' gives you the total number of files

Divide the output of the first by the second

Hope it helps,

Roy

-- 
Roy S. Schestowitz      |    Have you hugged your penguin today?
http://Schestowitz.com  |    SuSE Linux     |     PGP-Key: 0x74572E8E
  7:55pm  up 36 days  3:06,  14 users,  load average: 0.33, 0.76, 0.86

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index