CSCI 3294 (Unix Power Tools), Fall 2009:
Homework 1
- Credit:
- 30 points.
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 the topics for September 2):
- How to find out information
- Files and filesystem basics
- Processes and job control
(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.)
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
(unless a specific problem says otherwise);
if you use something other than Fedora Linux please tell me what.
(You will learn more about this topic if you use the man
and info commands rather than Google.)
- (5 points)
When you are reading a man page, is there a way to
search for particular text? What is it?
(Hint: Look in the man page for man
for mentions of a pager, and then read the man page for
the appropriate other program.)
- (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?
(Hint: man -k or apropos may be helpful.)
- (5 points)
The Linux date command will, among other things,
print today's date or a specified other date.
How would you use this command 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: The info page for date may be more helpful
than the man page.)
(To observe how UNIX systems are sometimes not alike,
try the same command on one of the department's OS X
machines.)
- (5 points)
On one of the lab machines, the command
ls -l /bin/vi produces the following output:
-rwxr-xr-x 1 root root 697592 2009-03-27 06:50 /bin/vi
What does all of this mean?
(I.e., what does the string of dashes and letters mean?
The 1? The 697592? and so on.)
(Hint: man ls and info ls may be helpful.)
- (5 points)
What command(s) would you use to create a directory in your
home directory called KeepOut to which you have
full access (read, write, and execute), but no one else
has any access?
- (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
2009-09-02