Tutorial #6 - Create File names (with ambiguous names: ?, *, [ ] )
1. Log on to UNIX if needed.
2. Create a new directory with any name at the level of the
machine directory, and then change directories to this new
directory.
3. Create three files containing the current date in this directory;
provide a name for each file so that you can use an ambiguous file
name to refer to all three.
4. Copy the three new files to the machine directory using their
ambiguous file name. Check the machine directory listing for their
appearance there.
5. Remove all files in your home directory that start with the letter
t; use the -i option so you see which ones are deleted.
6. Create a file named year.1901 in the machine directory. Then
move all files containing year in their names to the new directory
created in step 2. Check the directory listing.
7. Use an ambiguous file name with square brackets to print a few
files from your home directory. Notice that the print ID lets you
know how many files will be printed.
If it doesn't work:
A. If you don't get the effect that you want, try pwd to be sure
where you are in the directory hierarchy.
B. Don't worry too much if you remove and rearrange the files
differently from the ways mentioned in this tutorial. Just
insure you can control what happens when you specify ambiguous
file names.
C. If the printing facility is not available, substitute the cat or
more command to display the contents of the files.
Questions? Robert Katz:rkatz@ned.highline.edu
Last Update July 9, 2002