Showing posts with label dir size sort in unix. Show all posts
Showing posts with label dir size sort in unix. Show all posts

Friday, July 28, 2017

List Directory size in ascending/descending order in unix

$ du -sh *

The above command will list all the directories with size

$ du -sh * | sort -h

It will list all the directories with size in ascending order

$ du -sh * | sort -h -r

It will list all the directories with size in desccending order