Finding files
1 / 13 · ≈ 9 min left
The problem
The disk of the shop server is 97% full, and the app stops writing orders when it reaches 100%. You have a shell in ~/shop and GNU find. You want to know which files take the space, which logs are old, and what you can delete safely.
~/shop holds README.md, docs/readme.txt and 4 directories. logs/ has app.log (3 MB), app.log.1 (240 MB) and worker.log (2 MB, last written 35 days ago), plus logs/old/2026-08-30.log and logs/old/2026-08-31.log (1 MB each, written 48 and 47 days ago). src/ has index.js (3 lines), cart.js (2 lines) and cart.test.js (1 line). tmp/ has cache-1.tmp, cache-2.tmp, cache-3.tmp and a 150 MB upload-7f3a.bin. Every other file was written today. Every rep runs in ~/shop, starting from this state.