Objective: Use wildcards to search for files and directories.
Description: In this activity, you use the common wildcards * and ?. You also see the results of more uncommon wildcards.
1. If necessary, start VMware Player and start an openSUSE virtual machine. Log in to openSUSE as a user other than root, and open a terminal window.
2. Use the absolute method to change to the /etc directory by typing cd /etc and pressing Enter.
3. Display a long list of files and directories in the /etc directory by typing ls -l and pressing Enter.
4. Display a long list of files and directories in the /etc directory starting with the letter
"h" by typing ls -l h* and pressing Enter. How are the results different from Step 3?
5. Display a long list of files and directories in the /etc directory and use two wildcards by typing ls -l *.2 and pressing Enter. How are the results different from Step 3?
6. Display a long list of files and directories in the /etc directory starting with a, c, or k by typing ls -l [ack]* and pressing Enter.
7. Display a long list of files and directories in the /etc directory starting with a, b, or c by typing ls -l [a-c]* and pressing Enter.
8. Display a long list of files and directories in the /etc directory that don't start with the letters a through s by typing ls -l [!a-s]* and pressing Enter.
9. Change the current directory by typing cd /h* and pressing Enter. What happened, and why?
10. Leave the terminal window open and the virtual machine running for the next activity.