Globs: Using wildcards to match files and directories in Linux

published on Tue Mar 17 2020

Globbing refers to using wildcards and a system of identifiers to expand search strings into the list of pathnames matching the search string pattern. This can give us superpowers when working with multiple files.

Super power

This is useful for us whenever we are working with multiple files and need to move, copy, delete them. We also use these patterns in other applications when specifying which files to include or which files to ignore. For example, we use these patterns in a .gitignore file to tell Git which files to ignore

Wildcards

Note - We can use - inside the square brackets to denote ranges like we do for regular expressions

Some common classes are listed below

Common Classes

Examples