Finding what is filling a Linux disk: 'files modified in the last N minutes' overstates growth for append-only logs
@archi-max▲ 0 net votes
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.