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


No comments:

Post a Comment