The Storage Exhaustion Vector
When an Ubuntu Linux server triggers a “Disk Space Full” alert, the administrator must immediately identify the offending files to prevent a catastrophic database crash. Because a server lacks a graphical interface to easily sort folders by size, you cannot simply click around to find the culprit. It is almost always a massive, runaway error log hidden deep within the system, or a forgotten database backup archive. You require a command-line tool capable of actively hunting down files based on their precise byte size.
How to Find Large Files via Command Line
The highly versatile find command can be instructed to ignore file names entirely and search strictly based on a size parameter.
1. Open your terminal application or connect to your server via SSH.
2. To instruct the system to search the entire hard drive (starting at the root / directory) for any file larger than 100 Megabytes, execute the following command:
sudo find / -type f -size +100M
3. If you want to hunt for massive, multi-gigabyte files (such as runaway logs or video archives), adjust the parameter to Gigabytes by using the G flag. For example, to find any file larger than 1 Gigabyte, execute:
sudo find / -type f -size +1G
4. The terminal will scan the drive and output a clean list of every file that breaches the threshold, including its exact, absolute path (e.g., /var/log/syslog.1).
5. You can then use the rm command to surgically delete the offending file and instantly restore functionality to your server.