Chapters 1&2 ExercisesRead Chapters 1 and 2 of the UNIX text and work on the UNIX system. Make sure you can answer the following questions:Chapter 1 - UNIX Tour1-1 What role does the text book intend to play as explained in the first paragraph of Chapter 1? 1-2 What are the two major versions of UNIX? Which version is used on ACADAIX? 1-3 Skip the "Terminal Window" section on page 11. Describe three methods of logging off the Unix system. Try all of them. Make a note of which one(s) work using your given login shell. 1-4 On page 16, you are asked to try three methods of deleting keystrokes. What are they? Make a note of which one(s) work. 1-5 On page 17, try the two suggested methods of reissuing commands and see which one works. Name also the key combination that will bring back the last command on our system. 1-6 What is the shell file output redirection character? What effect does it have? 1-7 What is a home directory? How would you find out its contents? 1-8 Name 5 commands which can be used to display file contents. 1-9 Name the UNIX commands that will copy, erase, rename, and combine files. 1-10 Work on the review questions on page 30 of the text. 1-11 What does the term utility mean on UNIX? 1-12 What messages do you receive when you issue the
following Unix commands, and explain what is happening (type the lines in bold
exactly
as shown): 1-13 What is the pipe symbol? What effect does it have? 1-14 Explain the advantages of using the pipe symbol in a UNIX command. 1-15 What command line would you use to list users who are online in alphabetic order? 1-16 How would you produce a count of the number of users online without displaying each user? 1-17 Give the command line used to display only the number of users in the /etc/passwd file. 1-18 Explain the function of the grep command. 1-19 On pages 41-42, the text provided 3 commands that you could use to examine Unix environment variables. Make a note of which methods work using your shell and ACADAIX. 1-20 What does the $ character mean when given as input to the shell? 1-21 On page 45, why is the file total listed twice by the command: wc * 1-22 State the command used to find all files in your current directory whose name start with 'user'. 1-23 Explain the difference between echo $HOME and echo \$HOME. 1-24 How would you continue a long command onto a second line? 1-25 Explain the difference between echo user* and echo 'user*' . 1-26 From where do the following utilities
read their input? Where does the output go? 1-27 Explain what you would get as output from each
of the following
5 commands: 1-28 Explain the difference between these two
command lines: 1-29 Which group of the noclobber commands works in
our system? 1-30 Continue working from page 58 to 81. Practice write and mail with a friend, change your prompt to "Next command please:=>", set the alias of rm to "rm -i", and create the shell script new_script as illustrated. What command did you use to change your prompt? What command did you use to create the alias for the rm command? 1-31 Explain why the command on the top of page 66 (rm filename) does not remove the file right away. 1-32 What does pwd stand for? 1-33 Explain the differences among the following
commands: 1-34 Explain how to extract and display your login entry from the /etc/passwd file. 1-35 What starts a process? Is the shell you are interacting a process? 1-36 Explain how to run a process in the background. 1-37 Explain the difference between ps and ps -ef. 1-38 Explain how to tell the shell to stop the key sequence CTRL-D from logging you out. Chapter 2 - The Unix Text Editor vi2-1. Name 6 commands that switch vi from command mode to append/insert mode. 2-2. Name two ways to open a document. 2-3. How do you save a document and exit? How do you save a document without exiting? How do you exit vi without saving the document? 2-4. Explain the following vi command mode
instructions: 2-5. Explain the following vi settings: 2-6. What is the file .exrc used for? 2-7. Explain how to redraw the screen. (See page 143) |
Web Author: Ian! D. Allen idallen@ncf.ca |