How to use find to list big or old files on Linux, preview them safely and delete only what you checked.
find is the standard Linux command that searches a directory tree for files matching conditions such as size, age, name or type. 'find / -xdev -type f -size +1G' lists files larger than 1 GB on the root file system, which is often the fastest way to see what suddenly filled a disk.
-size +500M (larger than 500 MiB), -mtime +30 (modified more than 30 days ago), -name '*.log', -type f (files only), -xdev (do not cross into other file systems).
Add '-exec ls -lh {} +' to see sizes, or use GNU find's -printf, for example -printf '%s %p\n', and sort the output.
-delete removes every match immediately. Run the same command without -delete first, read the list, then add -delete as the last option.
sudo find / -xdev -type f -size +1G -exec ls -lh {} +sudo find /var/log -type f -name '*.gz' -mtime +30sudo find /var/log -type f -name '*.gz' -mtime +30 -deleteLast updated: 2026-10-08
How to find what fills a Linux disk with du and the interactive ncdu, with options that stay on one file system.
What an inode is, how to see inode usage with df -i, and how to find directories with millions of small files.
How to read df output, why Use% can reach 100% before Avail is zero for normal users, and how to check inodes with df -i.