Linux Survival Basics
Find the Largest CI Logs
A CI job is slow or hard to inspect because some logs are unexpectedly large.
Command
find logs/ -type f -printf '%s %p\n' | sort -nr | head -10
What changed
Nothing changes. The command reports the largest log files.
Danger
safe
When to use it
Use when log uploads are slow or a job output is unusually noisy.
When not to use it
Do not use it for compressed logs when you need uncompressed size analysis.
Undo or recovery
No undo needed because this command is read-only.
Expected output
The 10 largest log files with byte counts.
demo script
Disposable terminal steps
find logs/ -type f -printfind logs/ -type f -printf '%s %p\n' | sort -nr | head -10
simulated output
What it looks like
::fixture-ready::
$ find logs/ -type f -print
logs/unit.log
logs/integration.log
logs/build.log
logs/test.log
::exit-code::0
$ find logs/ -type f -printf '%s %p\n' | sort -nr | head -10
1200 logs/integration.log
130 logs/build.log
81 logs/test.log
6 logs/unit.log
::exit-code::0
YouTube Short
Find noisy CI logs.
Sort logs by size first. The biggest file is often where the pipeline is wasting your attention.
LinkedIn hook
Huge logs often point to loops, noisy tests, or runaway debug output.
Question: Have oversized logs ever hidden the real failure from your team?
experiments
A/B tests to run
Metric: watch_time
A: Huge logs hide failures.
B: Huge logs slow your deploys.