Back to lessons

Hosting Operations

Find Pages Missing Meta Descriptions

You need to list HTML pages without a meta description.

Command

find public -name '*.html' -print | while read -r f; do grep -qi 'name="description"' "$f" || echo "$f"; done

What changed

Nothing changes. The command reads each HTML file and prints pages missing description metadata.

Danger

safe

When to use it

Use after adding new templates or when checking generated content metadata.

When not to use it

Do not use it to judge description quality; it only checks whether the tag exists.

Undo or recovery

No undo needed because this command is read-only.

Expected output

A list of HTML files missing name="description".

demo script

Disposable terminal steps

  1. grep -Rni --include='*.html' 'name="description"' public
  2. find public -name '*.html' -print | while read -r f; do grep -qi 'name="description"' "$f" || echo "$f"; done

simulated output

What it looks like

disposable vessel
::fixture-ready::
$ grep -Rni --include='*.html' 'name="description"' public
public/about.html:4:
public/index.html:4:
::exit-code::0
$ find public -name '*.html' -print | while read -r f; do grep -qi 'name="description"' "$f" || echo "$f"; done
public/draft.html
public/blog/post.html
::exit-code::0

YouTube Short

Find pages without descriptions.

A simple loop over generated HTML shows which pages skipped the meta description tag.

LinkedIn hook

Missing descriptions are usually a content template problem, not a mystery.

Question: Do your generated posts all get descriptions, or only the main pages?

experiments

A/B tests to run

Metric: save_rate

A: Find missing descriptions.

B: Template missed the description tag.