Thứ Bảy, 2 tháng 1, 2010

LINUX - How to Find Large Files using Linux Command Line

find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’

or

find / -type f -size +20000k -exec ls -lh {} ; | awk ‘{ print $9 “: ” $5 }’ > filelist.txt


find / -type f -size +20000k -exec ls -lh {} \; 2> /dev/null | awk '{ print $NF ": " $5 }' | sort -nrk 2,2


To put the results in a text file.

Found here, a good resource for command line stuff – http://snippets.dzone.com/posts/show/1491

Không có nhận xét nào:

Đăng nhận xét