Short command to find total size of files matching a wild card

前端 未结 3 2141
自闭症患者
自闭症患者 2021-02-18 14:04

I could envision a simple shell script that would accomplish what I want by just iterating through a list of files in a directory and summing the individual size but was wonderi

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-18 14:48

    For don't show files list, and just show total size, use this:

    du -ch *.php.* | grep total
    

    Output:

    196M    total
    

提交回复
热议问题