Glob Patterns and Wildcards

At the end of the Modifying the Filesystem lesson, you read that you were going to learn what glob patterns and wildcards are. In this mission, you’ll start diving into those topics, and learn how to use them.

As you learned in the last lesson, you can modify the filesystem in many different ways. One of the other ways you can use the filesystem is to search for files. Glob patterns and wildcards can be used to extend your file searching ability, making it easier to search for all files that meet certain criteria.

In this lesson, you’ll learn to use different kinds of wildcards and characters to extend your knowledge of the command line and make it easier to find the precise files you need quickly.

If you’re familiar with regular expressions, glob patterns work in a similar way, only the characters are used and their roles are a bit different. Glob patterns are built from special characters called wildcards, and from regular characters.

(If you’re familiar with using wildcards when searching for files using the graphical user interface, nothing really changes when using those characters in one interface versus the other, but in this lesson, you’ll get practice using them in the terminal, just in case).

Using glob patterns and wildcards can be confusing at times. At every step in this lesson — as is always the case on Dataquest — you’ll be able to apply what you’ve learned and check that you’ve understood everything correctly before progressing to the next stage.


  • What glob patterns and wildcards are
  • How to use wildcards
  • How to search for files

Lesson Outline

  1. Wildcards and Globbing Patterns
  2. The * Wildcard
  3. The ? Wildcard
  4. Escaping Characters
  5. The Wildcard []
  6. Other Wildcards
  7. Summary and Practice
  8. Searching for Files
  9. Next Steps
  10. Takeaways

Get started for free

No credit card required.

Or With

By creating an account you agree to accept our terms of use and privacy policy.