↑↓ move Enter open Esc close

Glob (wildcard)

Patterns like *.txt, expanded by the shell before the command runs.

Globs are filename patterns: * matches any sequence of characters, ? a single one, [abc] one of a set, and {a,b} expands to each alternative. Critically, the shell expands them against the filesystem before the command runs: ls *.txt hands ls a list of names, never an asterisk.

This explains why quoting matters: find . -name "*.txt" needs quotes so the pattern reaches find intact instead of being expanded by the shell first. Preview any glob by prefixing echo.

See it in practice

$ echo *.txt && find . -name "*.txt"

Unquoted, the shell expands the pattern; quoted, find receives it intact and does its own matching. Same characters, different actor.

Where you'll meet it

Learn these concepts by typing them: the interactive course builds them up lesson by lesson in a real simulated shell.