5

[Bash] List Directory Size in Descending and Ascending Order

 3 years ago
source link: http://siongui.github.io/2018/03/22/bash-list-folder-size-in-descending-and-ascending-order/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Use du and sort command to list directory size in descending and ascending order.

List Folder Size (Descending)

$ du -s * | sort -rg

List Folder Size (Ascending)

$ du -s * | sort -g

References:

[1]how to list folder size in descending order ?


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK