Fast command-line recipes to locate the files that steal your disk space. 16.11.2025 | reading time: 2 min Disk filling up unexpectedly? Learn quick, repeatable commands to find the largest files on Linux and recover space fast. Zeroing in: commands and output Scenario: /var is bloated and a quick list of heavyweight files is needed; run the following to list files bigger than 100 MiB sorted by size. ``` sudo find /var -xdev -type f -size +100M -printf "%k KB %p " | sort -nr | head -n 10 ``` Example output: ``` 204800 KB /var/log/huge-log-file.log 153600 KB /var/lib/apt/lists/archive.tar.gz 102400 KB /var/backups/db-backup.sql ``` Directory-oriented quick view: ``` du -ahx /var | sort -rh | head -n 20 ``` Example output: ``` 1.0G /var/lib 200M /var/log/huge-log-file.log 150M /var/cache ``` Gotchas and options Performance and accuracy tips: add `-xdev` to avoid other filesystems, use `-size +100M` with care because find counts MiB blocks, prefer `-type f` to skip directories, and test removal commands before deleting; use `-exec ... +` to speed up many-file operations and remember permission errors can hide files unless run with sudo. Complementary tools Interactive and alternate approaches: `ncdu` for fast, keyboard-driven exploration; `du -sh * | sort -hr` for quick per-directory totals; `ls -lhS` to sort a single directory by size; combine `find` with `-mtime` to find old large files for archival. Wrap and next steps Start with small, read-only queries, inspect results, then act: compress, move, or delete the largest offenders and monitor with periodic checks; deepen skill by practicing these commands on safe test directories and consider formal Linux certification study to master more system administration tasks; bitsandbytes.academy offers intensive exam preparation for CompTIA Linux+ and LPIC-1. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities troubleshooting storage