Review Exercise 2
Sobell, Chapter 3 (pg 72-73)
Sobell, Chapter 4 (pg 99-101)
Due Date: 1/25/02


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

1. What commands can you use to determine who is logged in on a specific terminal?

2. How can you keep other users from using write to communicate with you?

3. What happens if you give the following commands when the file 'done' already exists?
    $ cp to_do done
    $ mv to_do done

4. How can you find out which utilities are available on your system for editing files?

5. What is the result of giving the 'which' utility the name of a command
   that resides in a directory that is not in your search path?

6. Experiment by calling the 'file' utility with names of files in /usr/bin.
   How many different types of files can you find there?

7. Find an existing file, or create a file, that:
     a.  compresses by more than 80 percent
     b.  compresses by less than 10 percent

   Use ls -l to determine the sizes of the files in question.

8. How are directories different from ordinary files?  How can they
   be distinguished using the ls utility?

9. Is each of the following an absolute pathname, a relative pathname, or
   a simple filename?

   a. milk_co
   b. correspond/business/milk_co
   c. /home/alex
   d. /home/alex/literature/promo
   e. ..
   f. letter.0610

10. Create a file named -x in an empty directory.  Explain what happens
    when you try to rename it.  How can you rename it?  How can you
    delete it?