How can I find only the catalogs and sort them by the size (human-readable).
I tried with
find -type d | xargs du -h | sort -rn
But something goes wrong. And all the time its sorted by the numbers. So it doesn't see the difference between K, M etc.
--max-depth=1
is a start when it comes todu
. As in: skipfind
and dodu --max-depth=1 -h . | sort -hr
(If your tools support the options.) Is that what you are looking for?