Hosting Operations
Read-only, can be slowCheck Image Tags in Manifests
You need to confirm which container image tags are present in deployment manifests.
Command
grep -RhoE 'image:[[:space:]]*[^[:space:]]+' deploy/ | sort -u
Before you run this
System impact: Read-only. Can create load on large logs, directories, filesystems, or process tables.
When not to use it: Do not rely on it if manifests are templated and the rendered output is the real source of truth.
Expected output
Unique image references such as image: registry.example/app:v1.2.3.
System impact
Read-only, can be slow. Nothing changes. Matching image lines are printed.
Scope this to the smallest useful path or service on busy systems.
Recovery / rollback: no state is changed.
When to use it
Use before or after a deploy to confirm expected image references.
When not to use it
Do not rely on it if manifests are templated and the rendered output is the real source of truth.
next steps
Related commands
Build a Deploy and Restart Timeline
Deploys and restarts are incident landmarks.
grep -Eh 'deploy|release|restart|started|stopped|rolled back' /var/log/app/*.log /var/log/deploy.log 2>/dev/null | sort
Summarize Test Counts from Reports
Before debugging a test failure, measure the blast radius.
grep -RhoE 'tests="[0-9]+"|failures="[0-9]+"|errors="[0-9]+"|skipped="[0-9]+"' artifacts/test/*.xml | sort | uniq -c
Extract Environment Names Only
Audit environment labels without printing secret values.
grep -RhoE 'ENVIRONMENT|NODE_ENV|APP_ENV|RAILS_ENV' config deploy | sort -u
Count Request IDs in Error Lines
Repeated request IDs can connect separate error lines to one failing path.
grep -Ei 'error|timeout|fatal|exception' /var/log/app/app.log | awk '{for (i=1;i<=NF;i++) if ($i ~ /^request_id=/) print $i}' | sort | uniq -c | sort -nr
Find Apache Document Roots
Apache was serving files from a different directory than expected.
grep -RInE '^[[:space:]]*DocumentRoot[[:space:]]' /etc/apache2/sites-enabled 2>/dev/null
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.