calculate total used disk space by files older than 180 days using find

前端 未结 5 1704
自闭症患者
自闭症患者 2020-12-25 12:21

I am trying to find the total disk space used by files older than 180 days in a particular directory. This is what I\'m using:

    find . -mtime +180 -exec d         


        
5条回答
  •  太阳男子
    2020-12-25 13:23

    Why not this?

    find /path/to/search/in -mtime +180 -print0 | du -hc --files0-from - | tail -n 1
    

提交回复
热议问题