Disk usage in Mac terminal not working with --max-depth

by felice   Last Updated June 12, 2019 08:12 AM

I want to see my disk usage for a specific folder with a pre-set maximum depth. On Linux, the command is

$ du -h --max-depth 1

On macOS Mojave (10.14.5), this is not working. I also tried

$ du -hd1

as described here, also not working. The terminal output is:

usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m | -g] [-x] [-I mask] [file ...]

What is the best solution?

Related Questions

How do I speed up new Terminal tab loading time?

Updated March 26, 2015 09:04 AM

How to send text with telnet in Terminal?

Updated June 16, 2016 08:05 AM

Get serialnumbers of conneted usb devices

Updated March 06, 2017 13:12 PM