Skip to content

4 Comments

  1. PiFanatic
    2026-07-09 @ 15:11

    That’s a really good point about the logs – I’ve definitely wasted a lot of space just letting those accumulate. It’s easy to overlook those hidden bits!

    Reply

  2. JJ
    2026-08-10 @ 23:00

    The command `du -h –max-depth=1 |sort -hr` does NOT work for me.
    it says `du -h` is for help and it does not know what `–max-depth` is.

    Reply

    • Chris Viviers
      2026-08-11 @ 08:52

      Hi! Thanks for pointing this out. I just double-checked the article and the command there is correctly written with two hyphens: du -h –max-depth=1 |sort -hr — so it should work as-is if copied straight from the page.

      It looks like inbetween copying and pasting (or typing it out), the double hyphen in your command before “max-depth” got turned into a single long dash (–) instead of two regular hyphens (–). Some apps and autocorrect features do this automatically, and it looks nearly identical on screen but the shell won’t recognize it as a valid flag, that’s why du falls back to showing help instead of running the command.

      Could you try typing the two hyphens manually instead of copying, or paste it into a plain text editor first to check for stray characters? That should fix it. Let me know if it’s still acting up!

      Reply

      • JJ
        2026-08-12 @ 21:01

        I found the issue: I had `du` set as an alias to `ncdu`.
        I just ran the command as this: `/usr/bin/du -h –max-depth=1 |sort -hr`

        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *