how to get figure out average file size

Alternatively, use df to find the space used, and something to find the number of files (e.g. find -x /mountpoint -type f | wc), then divide it out. Not quite as elegant, but perhaps easier to remember.
 
If you want to use df, you can do this:

df -bi /myfs | awk '{print $3*512/$6}'

Note that it is not as accurate because df won't show bytes used, only 512-blocks as a minimum. On a big filesystem with few files, it will be close enough for government work.
 
Back
Top