Lab 2

The "lab" portion of our class is implemented as weekly assignments.

All of this should be done on SNOWBALL.

Use the script command to make a log of your activities. "script lab2.txt"

Use the date command.

Make a new sub-directory, called labs

Change to that directory. Use the pwd command to verify that you are in the correct directory.

Move the two files from before to this directory. Use "ls -l" to verify that the files are there.

Use the cat utility to create a new file (cat > testfile), then type 4 lines, then press CTRL-D to stop. Use the first 4 letters of your first name, and copy (or type) the corresponding lines from the Robert Frost poem below.

Use the "wc" utility to show how many lines are in the file. Then show how many words are in it.

Use chmod so that your two files have read and write privileges for you, but not for the group or world. Use "ls -l" to verify that this worked.

Type "exit" to stop the script. Turn in the script file.

Finally, schedule an appointment with one of the TAs, to demonstrate your assignment. The TA will ask you questions about this work, and may vary it as appropriate. For example, you may be asked to provide the number of lines in one of the other files that you have. Another example: you may be asked to use chmod to assign read privileges for the file's group.


A Winter Eden
(Robert Frost)

A - A winter garden in an alder swamp,
B - Where conies now come out to sun and romp,
C - As near a paradise as it can be
D - And not melt snow or start a dormant tree.

E - It lifts existence on a plane of snow
F - One level higher than the earth below,
G - One level nearer heaven overhead,
H - And last year's berries shining scarlet red.

I - It lifts a gaunt luxuriating beast
J, K - Where he can stretch and hold his highest feat
L - On some wild apple tree's young tender bark,
M - What well may prove the year's high girdle mark.

N - So near to paradise all pairing ends:
O - Here loveless birds now flock as winter friends,
P, Q - Content with bud-inspecting. They presume
R - To say which buds are leaf and which are bloom.

S - A feather-hammer gives a double knock.
T - This Eden day is done at two o'clock.
U, V, W - An hour of winter day might seem too short
X, Y, Z - To make it worth life's while to wake and sport.