Please Refer to Chapter 4 in the textbook, The Linux Command Line, for detailed discussion on wildcards. Today, we will just cover two types of wildcards, * and ?.
In addition to instructing the shell to perform operations on specific files or directories, we can use wildcards to ask the shell to perform operations on groups of filenames or directories with shared properties.
* will match any string of characters
? will match any individual character
Exercise: What will the following commands do?
$ls file1.txt file2.txt file100.txt dir1 dir2 $ls -d dir1 dir2 $cp *.txt dir1 $cp file?.txt dir2
* are a dangerous combination. Please use care in removing items with wildcards and always use