"Unix Environment" Exercises
1. Name the three major shell types.
2. What is the "general" Unix command syntax?
3. Show the Unix command syntax required to produce a long listing of the .profile file that is located in your home directory:
4. Move to the "/home/samples/metachars" directory. Using the ? metacharacter, list the files that begin with the letter "a" and contain exactly two characters in the file name.
a. Now list the files that begin with the letter "a" but have three characters in the file
name:
5. If you are not already in your home directory, move there. Redirect the standard output from the Unix "date" command so that this output is put in a file named "info".
a. Append the output from the "ps -ef" command to the file created in the last step, "info". (Use the ">>" symbol.) Then use "more" to view the contents of the file ("more info").
b. Append the output from the "set" command to the file created in the last step, "info". (Again, use the ">>" symbol.) Again, use "more" to view the contents of the file ("more info").
c. Now, re-direct the output of the "who" command to the file named "info". In this step of the exercise, use the re-direction symbol ">". Again, use "more" to view the contents of the file. How has the file changed? Why?
6. You want to know the number of files and directories located in your home directory. To do this, you can combine the command "ls -al" and "wc -l" in a pipeline, feeding the standard output from the ls command in to the standard input of the wc command. Write the pipeline command in the proper order below, and test it at your terminal.
Next: Project #1: Create Your Up: The UNIX Environment Previous: Summary   Contents |