du command sort by maximum size first

Hi,

I am new to Debain/Linux

How do we list folder size has maximum size

using du command. How we can get maximum file size on the top

I mean I want du command sort by maximum size first

Thanks
tia_kamakshiAsked:
Who is Participating?
 
Maciej SConnect With a Mentor sysadminCommented:
Use sort for this:
du -sk * | sort -n
or sort -r (to reverse your sorted output).
0
 
fosiul01Connect With a Mentor Commented:
have a look this one

http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html

if you want to do suppose top 10

du -sk * | sort -nr | head -10
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.