Back to commands

Hosting Operations

Read-only, can be slow

Check 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.

Watch this command run

Command transcript

This sanitized transcript shows the commands and output shape without exposing host details.

demo@lab:~$

$ cat deploy/app.yaml

image: registry.example/app:v1.2.3
image: registry.example/worker:v1.2.3

$ grep -RhoE 'image:[[:space:]]*[^[:space:]]+' deploy/ | sort -u

image: registry.example/app:v1.2.3
image: registry.example/worker:v1.2.3
View commands shown

These are the commands shown in the sanitized transcript.

Commands shown

  1. cat deploy/app.yaml
  2. grep -RhoE 'image:[[:space:]]*[^[:space:]]+' deploy/ | sort -u

next steps

Related commands

Hosting Operations Can be slow

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
Cybersecurity Triage Can be slow

Extract Environment Names Only

Audit environment labels without printing secret values.

grep -RhoE 'ENVIRONMENT|NODE_ENV|APP_ENV|RAILS_ENV' config deploy | sort -u
Hosting Operations Can be slow

Build a Deploy and Restart Timeline

Deploys and restarts are incident landmarks.

grep -Eh 'deploy|release|restart|started|stopped|rolled back' fixtures/incidents/*.log | sort
Hosting Operations Can be slow

Count Request IDs in Error Lines

Repeated request IDs can connect separate error lines to one failing path.

grep -Ei 'error|timeout|fatal|exception' fixtures/incidents/app.log | awk '{for (i=1;i<=NF;i++) if ($i ~ /^request_id=/) print $i}' | sort | uniq -c | sort -nr
Hosting Operations Can be slow

Find Apache Document Roots

Apache was serving files from a different directory than expected.

grep -RInE '^[[:space:]]*DocumentRoot[[:space:]]' fixtures/apache/sites-enabled
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.

  • lpic1:103-gnu-unix-commands
  • lfcs:essential-commands
  • lfcs:operations-deployment
  • lfcs:services-logs
  • linuxplus:automation-scripting
  • linuxplus:provisional
  • risk:read-only

Useful for

  • LPIC-1 style command-line practice
  • LFCS style performance tasks
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.