Set 7
Home Up Introduction Set 1 Set 2 Set 3 Set 4 Set 5 Set 6 Set 7 Set 8 Set 9 Set 10 Set 11

 

Shell File Patterns

Due: Wednesday January 6, 1999

Hand in your output before you go home today.

Purpose:

Develop skills using Unix tools.

Assignment:

Start in this directory: ~ian/set7

Answer these questions. Give the Unix command lines you used to arrive at your answers. (Cut and paste will work nicely to show your commands and their output.)

  1. This directory contains a bunch of things that are all the same size and have similar names. Which one is a directory? How can you tell?
  2. What is the shortest command you can type to enter the sub-directory that is under the ~ian/set7 directory?

Go into the sub-directory that is under the directory  ~ian/set7 and answer these questions:

  1. There are more than 50 files and/or directories in this sub-directory.
    Use Unix commands to count exactly how many.
  2. How many of the entries here are directories?
    Use Unix commands to count exactly how many.
  3. How many files are compressed files?
    Use Unix commands to count exactly how many.
  4. The "sum" command ("man sum") produces a number based on the content of a file. While not guaranteed to be true for every file, the number is always the same if the file content is the same, and usually different if the file content is different. (Rarely, different content can produce the same number.)

    Many of the files in this directory contain the same content. Use Unix commands to find out which files are the same and which are different. How many different files are there, really? (You may need to uncompress some files to answer this question.)

    Use a Unix command to locate the differences among the files that are different. Cut-and-paste just the differences.

Hand In: 

On paper, submit the cut-and-paste output of the command lines you used and the output they generated.

Additional material:

Based on material from Chapters 3 through 5 of the Unix System text.

See also the section on Unix in this page:

http://www.hotwired.com/webmonkey/backend/backend_more.html

"On the résumé that convinced HotWired to hire me, I said that I knew enough about Unix that it didn't scare me anymore. This wasn't exactly true. Unix was still a chilling concept for me when I arrived at the San Francisco office armed with a copy of Unix for Dummies. The managing editor steered me to my desk and instead of the Macintosh I was hoping for, there sat a purple SGI."