In shell, to list the files in a folder recursively ordered by size
(excluding sub-folders), run the following command:
find . -type f -exec du -h -a {} + | sort -hr | head
See Using semicolon (;) vs plus (+) with exec in find
for the meaning of {}
and +
in the exec
clause of find
command.
Verified in bash and zsh.