Review Exercise 3
Sobell, Chapter 5 (pg 123-124)
Sobell, Chapter 6 (pg 184)
Find utility (pg 753)
Due Date: 2/16/01


Please complete the following Review Exercises.
Place your answers underneath each question using a
Unix text editor.  Turn in your answers as follows: turnin ex3 exercise3.txt 

1. What should you do if you do not want to wait for a command to finish before
   running another command?  

	suspend like this: cntrl+z
	put in background like this: bg 

2. Assume the following files are in the working directory:
   $ ls
   intro   notesb   ref2   section1   section3   section4b
   notesa  ref1     ref3   section2   section4a  sentrev

   Give commands for each of the following, using wildcards to express filenames
   with as few characters as possible.
   a.  List all files that begin with section.
		ls section*

   b.  List the section1, section2, and section3 files only
		ls section[1-3] or ls section?

   c.  List the intro file only
		ls intro

   d.  List the section1, section3, ref1, and ref3 files only 
		ls *1 *3  or ls *[13]

3. Give a command to redirect the standard output from a sort command into a
   file named 'phone_list'.  Assume the input file is named 'numbers'.

		sort numbers > phone_list

4. What is a window manager?  Name two X Window System managers and describe
   how they differ.

	twm and fvwm

5. Given two computer systems that can communicate over a network, bravo and 
   and kudos, explain what the following command line does:

   bravo % xterm -sb -title bravo -display kudos:0.0 &

	This command starts an xterm with a scroll bar (-sb)
   with the title bravo (-title brave) and displays
   the xterm on the machine named: kudos. 

6. What do you have to do to a script in order to be able to execute it?

	Make it executable like this: chmod +x scriptname

7. What is the purpose of the PATH variable?

	The PATH variable is simply a list of directories to
	be searched when a command is typed.  Each directory is
	searched, one by one, looking for the presence of the command.

8. If your PATH variable is not set to search the working directory, how
   can you execute a program located there?

	./program

9. Assume that you have made the following assignment:

   $ person=jenny

   Give the output of each of the commands below:

   a. echo $person
		jenny

   b. echo '$person'
		$person

   c. echo "$person"
		jenny

10. Using the find utility (page 753), perform the following steps:

   a. List all files in the working directory that have been modified within the last day.
	find . -mtime -1 

   b. List all the files in your home directory bigger than 1MB.
	cd into your home directory (cd )
	find . -size +1000000c -ls 

   c. Remove all the files named core from the directory structure rooted at your home directory.
	cd into your home directory (cd )
	find . -name "core" -exec rm {} \;