Penguin
Note: You are viewing an old revision of this page. View the current version.

A File Glob is a way to match files. "*" matches any charactor. "?" matches any charactor exactly once. "[a-z?" matches any charactor in the range a-z.

Some examples
  • .*

matches all files that contain a "." in them.

a*

matches all files that begin with a

[a-z?*

matches all files that begin with a lowercase letter

*.gz

matches all files that end with .gz

Note, * and ? don't match / or a . at the beginning of a filename eg: * doesn't match
. .. .foo baz/nargle
but does match
foo.txt baz/

See glob(7) for more advanced uses.

Contrast RegularExpression.