Skip to content

CodingShower

  • Home
  • About
Skip to content

CodingShower

All Things Software

Tag: unix

Check Which Folders or Files are Using the Highest Disk Space (Linux, macOS, BSD)

Posted on August 28, 2022August 28, 2022 by Rick

If your disk is almost full and you want to track down where the disk space is going, i.e., which files or folders are occupying the most or maximum amount of space then you can start with using the du (disk usage) utility to which you’ll have to pass a couple of options: The different […]

0

Sort du Command Output by File/Folder Size (Linux, macOS, BSD)

Posted on August 27, 2022August 28, 2022 by Rick

TL;DR: To sort du command’s output in ascending order of the file and/or directory sizes, we can pipe its output to sort -h. To sort in descending order, pipe it to sort -hr. This should work in most Unix-based or Unix-like operating systems (Linux, BSD, macOS): The du command displays the disk usage statistics (estimated […]

0