Pattern matching using the * wildcard character

Use the asterisk (*) to match any sequence or string of characters.

The (*) indicates any characters, including no characters.
See the following examples:
  • If you have the following files in your directory:
    1test 2test afile1 afile2 bfile1 file file1 file10 file2 file3   
    and you want to refer to only the files that begin with file, use:
    file*
    The files selected would be: file, file1, file10, file2, and file3.
  • To refer to only the files that contain the word file, use:
    *file*
    The files selected would be: afile1, afile2, bfile1, file, file1, file10, file2, and file3.