From the course: Bash Patterns and Regular Expressions

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Wildcards

Wildcards - Bash Tutorial

From the course: Bash Patterns and Regular Expressions

Start my 1-month free trial

Wildcards

- [Instructor] The simplest form of file glob is the wildcard. Wildcards exists in most all operating systems even if they don't have command line interfaces. Often we can use wildcards to match patterns in file requested dialogs. However, they are much more useful on the command line. The most common wildcard is the asterisk character. Don't feel bad if you call it the star because in Latin asterisk means star. It is literally a star character. File dot asterisk would match any file starting with the word file followed by a dot and any number of any characters such as file.txt, file.jpg and file.tar.gz. The asterisk is often used to match file extensions, for instance, asterisk dot txt would match any file ending with .txt. You can place the asterisk between other characters as well. For instance file asterisk dot txt would match any file that starts with the word file is followed by any number of any characters and ends with .txt such as fileforaccounting-41435.txt. It will even…

Contents