When working on the command line, quite a bit of your time will be spent locating files that you want to work with. The shell offers a neat set of pattern matching or metacharacters that enables you to match filenames based on the pattern you supply. You can also use character classes to match filenames. But as it’s quicker using the metacharacters on the command line, we will stick with these in this chapter.
In this chapter we will cover:
pattern matching using any character string;
pattern matching using single characters; and
pattern matching using alpha or numeric characters.
Here are these special characters.
|*||Matches any string including a null string.|
|?||Matches any one character.|
|[...]||Matches any characters ...|