Show disk usage per directory

Show the 15 largest top-level directories.

du -sh /* 2>/dev/null | sort -rh | head -15

tool
linux133 commands
tags
linux

More linux commands

  • ss -tlnp

    Show listening TCP ports with PID and process name. The modern replacement for netstat.

  • ss -tlnp | grep :<port>

    Show which process is listening on a given port.

  • ps aux --sort=-%cpu | head -15

    Sort processes by CPU usage and show the first 15 lines.

  • ps aux --sort=-%mem | head -15

    Sort processes by memory usage and show the first 15 lines.

  • journalctl -u <service> -f --since '10 minutes ago'

    Show the last 10 minutes of a unit's logs and keep printing new lines.

all 133 linux commands