Homework #2

Due Tuesday, September 20, 6:00 PM

Problem 1

Show how to use egrep-style regular expressions to search for

Problem 2

Name an easy way to add the line ``That's all folk's'' to the end of a file.

Problem 3

How can Unix applications determine your default printer? How do you set your default printer?

Problem 4

How can you use the ls command to list files in the order in which they were created, that is, from oldest to newest?

Problem 5

How do you copy the first 50 and last 50 lines of one file into another?

Problem 6

Try out the following two ways of saving a directory into a single file. First, compress all the files of the directory and then tar the compress'ed files. Now, tar the directory and compress the tar'ed file. Which method results in a smaller file?

Problem 7

How do you use the od command to list the bytes of a file as hexadecimal numbers? (No, we didn't study od in class. Read either the book or the man page.)

Problem 8

What option of wc counts the characters in a file?

Problem 9

Describe how wildcard characters can be used in the C shell to match

Problem 10

How do you create a file called ``M*A*S*H''.

Problem 11

Describe how you use the find command to

Problem 12

Mail your answers to Problems 1 to 11 to Dean Brock.

Back to the Handout index