Unix find average file size

前端 未结 7 2379
忘掉有多难
忘掉有多难 2020-12-13 09:23

I have a directory with a ton of files I want to find the average file size of these files so something like ls somethinghere whats the average file size of everyth

7条回答
  •  一个人的身影
    2020-12-13 10:13

    Use wc -c * to get the size of all the files and ls | wc -l to get the number of files. Then just divide one by the other.

提交回复
热议问题