Search⌘ K
AI Features

Using Glob Pattern with the find Utility

Explore how to apply glob patterns using wildcard characters to enhance file searches with the find utility in Bash. Learn to combine search conditions and troubleshoot common issues on Windows systems to locate files effectively.

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 ...