Directory exercises

Homework #3 -- due 4 October, 1996

This homework assignment is "supported" on the computer If you are adventurous and want to try it out on the NCSU EOS systems, proceed at your own risk.

You'll turn in the assignment by emailing a "script" of your completing the assignment. First, type the Unix command

This will caused the output of your commands to be stored in the file typescript. Second, do the assignment. Third, end the script by typing

Fourth, use pine to attach the file typescript to a message sent to the instructor.

The assignment

Problem Solution
1 Connect to your home directory. cd
2 Make another directory called playpen under your home directory.
3 Inside playpen, make four directories: computers, eating, recreation, and chemistry.
4 Change to your playpen directory. Copy all of the files from the directory ~brock/171/playpen into your playpen directory using the following commands:
cd ~/playpen
cp ~brock/171/playpen/* .
5 Use more to find out what the files elephants and plane.fud contain.
6 Use cat to find out what the file pretty_woman contains.
7 Copy the file plane.fud to the eating subdirectory of playpen.
8 Move the file to the recreation subdirectory.
9 Remove the file plane.fud2 from your playpen directory.
10 Copy the file to the computers subdirectory.
11 Use more to look at the files elements and elements.old. Use cmp to see if they are the same. Use diff to compare them. What is the difference? (Look at the man page for diff to see how to interpret what it tells you.)
12 What are the first ten lines of murphy.laws?
13 What are the last ten lines of murphy.laws?
14 Use grep to find out if the file dirt.cake contains the characters "chocolate".
15 How many lines are in the file elements? Use wc

Return to the CSCI 171 homework index
Return to the CSCI 171 index
Return to Dean Brock's home page
UNCA CSCI logo Return to the UNCA Computer Science home page