读书人

How do I find the largest top 十 fi

发布时间: 2012-09-28 00:03:35 作者: rapoo

How do I find the largest top 10 files in linux?
http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/

To find out largest file only use command ls as follows in current directory:
ls -lSh . | head -5
Output:
-rw-rr 1 vivek vivek 267M 2004-08-04 15:37 WindowsXP-KB835935-SP2-ENU.exe
-rw-rr 1 vivek vivek 96M 2005-12-30 14:03 VMware-workstation-5.5.1-19175.tar.gz
ls -lSh /bin | head -5
You can also use find command but not du:
find /var -type f -ls | sort -k 7 -r -n | head -10

读书人网 >UNIXLINUX

热点推荐