Glob Pattern

A text pattern that uses wildcard characters to match filenames or text strings. Glob patterns are commonly used for file matching in command-line interfaces, path specifications in configuration files, and pattern matching in programming languages. Some examples of glob pattern characters are:

  • Asterisk (*): Matches any number of characters (including none)

  • Question mark (?): Matches exactly one character

  • Square brackets ([]): Matches any single character within the brackets

  • Curly braces ({}): Matches any of the comma-separated patterns inside

For example, *.txt matches all text files, while file-?.log matches files like file-1.log" or file-a.log.

Related Content