I want to find all directories with a specific name (e.g. .stversions) and get a list sorted by their size. I plan to use find -name .stversions to get the directories, du -hd1 to determine the size of each, and sort -h. But I cannot get them into a single line command:
find -name .stversions | du -hd1 | sort -h
seems not to select the directories (which the command alone does) but - after some complains about permission denied - to determine the size of the directories in the current directory and produce the sorted output. How to pipe the output from find to du?