...

/

Using Glob Pattern with the find Utility

Using Glob Pattern with the find Utility

Learn to use glob pattern with the find command.

What is a glob pattern?

A glob pattern is a search query that contains wildcard characters. Bash allows three wildcard characters: *, ?, and []. The asterisk stands for any number of characters. A question mark means a single character of any kind.

Here is an example of glob patterns. The string README matches all following patterns:

  • *ME
  • READM?
  • *M?
  • R*M?

Square brackets indicate a set of characters at a specific position. For example, the pattern [cb]at.txt matches the ...