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)

上一篇:TOJ 1214: 数据结构练习题――线性表操作


下一篇:NOIP200701