How to find large file size on Unix
ใช้ Code ตามนี้หาเลย
find / -type f -size +1000000k -exec ls -lh {} \; | awk ‘{ print $9 ” : ” $5 }’
+1000000k บอกว่า ไฟล์มากกว่า 1 GB
awk ‘{ print $9 ” : ” $5 }’ print ข้อความของ -exec ls -lh {}
-exec ls -lh {} คือ Execute ls option -lh
{} คือ ทำเป็น Array โดยเริ่มที่ Index ที่ 1 (index 0 คือ output ของทั้ง Line)
Tags: How to find large file size on Unix, Solaris File Size