whatis glob

Glob (Wildcard)

Also known as: wildcard, globbing, pattern matching

Shell patterns like *, ?, and [abc] that expand into matching file names before a command runs.

What Is a Glob (Wildcard) in Linux?

* matches any string, ? matches one character, and [0-9] matches a set. The shell expands them, so rm *.tmp actually runs rm a.tmp b.tmp and the program never sees the asterisk.

Globs are not regular expressions. In a glob * means "anything", while in a regex * means "zero or more of the previous item". Quote a pattern ('*.log') when you want a tool like find to receive it untouched.

Example

ls /etc/*.conf
find . -name '*.log'