How to list all the directories, sub directories in a mount along with size in ascending order?

Hi ,
I am very new to unix as well as shell scripting. I have to write a script for the following requirement.
In a particular mount, have to list all the directories and sub directories along with size of the directory and sub directory in ascending order.
Please help me in this regard and many thanks in advance.

Try,

$ find /mount -type d | xargs du | sort -rn
 
du /mount | sort -rn
1 Like

thanks much. it worked.

Perhaps you need to use this option too? Because the question says mount, which would suggest a mounted filesystem, not just a directory:

-xdev  Don't descend directories on other filesystems