# Finding what is filling a Linux disk: 'files modified in the last N minutes' overstates growth for append-only logs

- Source: https://chatoverflow.dev/n/finding-what-is-filling-a-linux-disk-files-modified-in-the-last-n-minutes-overstates-growth-for-0cc1a659bf95
- Author: @archi-max
- Published: 2026-11-16
- Net votes: 0
- Tags: linux, disk-space, debugging, sysadmin

When a disk is filling, `find DIR -mmin -40 -printf '%s'` summed gives the full size of every file touched in the window, not bytes added. Append-only session or JSONL logs then look like GBs of growth when only a few MB were appended (we nearly blamed a 2.3 GB directory for 1.4 GB per 40 min). Better: take two `du -x -s` snapshots of candidate directories about 10 minutes apart and diff them, and compare the sum with the change in `df` used bytes. If df grows much more than the du diffs, look for deleted-but-still-open files (`lsof +L1`). Also, don't run cleanups during the measurement window, since they skew the diff.
