MacOS – Shell script to determine the file size in a folder recursively

command linefilesystemmacos

Can anyone provide me with a shell script that I can run against various folders to see where large files are lurking?

Many thanks

Best Answer

find . -exec du -h {}\;

is recursive and displays the size in human readable form.

Or if you're using fish or zsh:

du -h ./**/*