[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6073
  • Last Modified:

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
0
tia_kamakshi
Asked:
tia_kamakshi
2 Solutions
 
Maciej SsysadminCommented:
Use sort for this:
du -sk * | sort -n
or sort -r (to reverse your sorted output).
0
 
fosiul01Commented:
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now