Linux 下找出超過某些容量的檔案

找目前所在位置下,所有檔案大小超過3M的file,並列出檔名:大小

find . -type f -size +3M -exec ls -alh {} \; | awk '{print$9 ":" $5}'

 

-size n[cwbkMG]
File uses n units of space. The following suffixes can be used:

`b' for 512-byte blocks (this is the default if no suffix is used)

`c' for bytes

`w' for two-byte words

`k' for Kilobytes (units of 1024 bytes)

`M' for Megabytes (units of 1048576 bytes)

`G' for Gigabytes (units of 1073741824 bytes)

posted @ 2014-03-14 09:08  春天播種,秋天才會收穫  阅读(201)  评论(0)    收藏  举报