CSCI 3294 (Unix Power Tools), Spring 2005:
Homework 1

Assigned:
March 7, 2005.

Due:
March 21, 2005, at 5pm. Accepted without penalty through March 28, 2005, at 5pm.

Credit:
30 points.

Reading

Read about the following topics in the list of suggested readings, either in one of the suggested readings or in another book or reference. (These are all the topics for January 24 and the first one for February 7.):

(Notice that questions below are grouped by topic, so you can read about one topic, do the related questions, and then move on to the next topic.)

Problems

Answer the following questions. You may write out your answers by hand or using a word processor or other program, but please submit hard copy, either in class or in my mailbox in the department office. Answers to most questions will involve experimentation on a UNIX or Linux system. You are free to use any appropriate system; if you use something other than Red Hat Linux please tell me what.

How to find out information

  1. (5 points) Most Unix systems have a command that will print today's date, or a specified other date. What command is this, and how would you use it to find out what day of the week you were born? (I.e., tell me the line or lines you would type in a terminal window to accomplish this.)

    (Hint: man -k or apropos may be helpful.)

    Try using the same command to find out what day of the week one of your parents was born (or some other interesting historical date at least 40 years ago). Does it work? If not, why not?

  2. (5 points) When you are reading a man page, is there a way to search for particular text? What is it?

    (Hint: man man and man less may be helpful.)

Files and filesystem basics

  1. (5 points) On one of the lab machines, the command ls -l /etc/passwd produces the following output:

    -rw-r-r- 1 root root 2545 Aug 8 09:57 /etc/passwd

    What does all of this mean? (I.e., what does the string of dashes and letters mean? The 1? The 2545? and so on.)

    (Hint: man ls and info ls may be helpful.)

  2. (5 points) What command(s) would you use to create a directory in your home directory called KeepOut whose contents can be read only by you?

  3. (5 points) What command(s) could you use to find out how much disk space is available on all the mounted disks? What command(s) could you use to find out how much disk space is taken up by all the files in your home directory?

Processes and job control

  1. (5 points) Suppose you have started a GUI application called bigpig that for some reason doesn't seem to be responding to any input. How do you terminate it without logging out or rebooting the machine? Describe as many ways as you can think of.

    (Hint: man ps and man kill.)



Berna Massingill
2005-03-09