CPS 125 

				Alexander Ferworn

					LAB 1

Purpose: This lab is to teach you about the Ryerson MATRIX
computers (Hopper and Turing) and the UNIX environment.
In addition the Lab leader will show you how to access the course
web site.

Since MS-DOS was loosely based upon UNIX, many of you will 
be familiar with some UNIX concepts.  Our IBM AIX UNIX allows
some MS-DOS style commands which almost all other UNIX variants
do not accept (eg: cd/ vs cd /).  To ensure that you know UNIX,
and not just MS-DOS, use the UNIX version of any such commands. 

Finally, email is available only on Hopper, program development
(editing and compilation) is available only on Turing.

1.  Press any key to de-activate screen saver, and lower screen
       brightness to avoid eye strain and equipment damage.
2.  Select MATRIX access and then Hopper from menus to get to
       the login prompt.
3.  Log onto the Hopper system at the login prompt.
    a. Type yourusername  (followed by <ENTER> key for all UNIX
          commands).
    b. Type your password (not echoed for security).
    c. Note home directory at shell prompt.
4.  Learn how to change your password.  Do this after the lab.
       REMEMBER your password - once lost, it's gone; lab
       advisors in W71 can reset passwords to original values.  
5.  Check (print to screen) your current (working) directory.
6.  Log off Hopper: type logout at UNIX prompt.  
7.  Log on to Turing.
8.  Repeat 1-5 for Turing.  Select a different password.
9.  List the files in your home directory in simple format.
10. List the same files in a more complete format.
11. List the files in the course directory for this lab:
       ls  /home/t4a/cps125aa/lab1
       ls -al  /home/t4a/cps125aa/lab1
12. Log off Turing and log onto Hopper again.
13. Send mail to the person sitting beside you (ask for his/her
       public userid - not the secret password!).  
    Give a three word subject and a one line mail message. 
       ALWAYS follow correct email protocol - be polite!
14. Read the mail just received, and reply to it (one line). Do
       not send copies to all receivers of the original message.
       Do include the original text you just received.
    After replying, briefly look at your neighbour's screen to
       note what happened when your reply arrived.  Read the
       reply you sent together with your neighbour.
15. Save all received mail in folder "received", quit mail
       (removing the saved mail entry from the inbox index).

REMEMBER: Students are to check email twice daily and are
responsible for all course related instructions so transmitted.
  
16. Log off Hopper, and log on to Turing again.  
17. Make a new subdirectory named cps125 in your home directory.
18. Change to the new subdirectory, change back to home (~),
       then to new subdirectory again.
19. List the files in this new subdirectory.
20. Copy the C file proverb.c from the course lab directory to
       your new subdirectory. (All UNIX commands are case
       sensitive, so type carefully.  Note especially the space
       before the final period.) 

          cp  /home/t4a/cps125aa/lab1/proverb.c  .

       The copy command is cp source_file target_directory
21. List the files in the subdirectory again.  Note change.
22. Display the file proverb.c using cat
    Note use of more (for future use)
    a. pipe to more - only "space bar" effective.
    b. execute more as command, both space bar and b effective 

23. List the files in the subdirectory.
24. Compile and link-edit the file proverb.c
25. List the files in the subdirectory.  Note changes.
26. Execute proverb.c   
27. Compare program action with source code 

28. Make ONE (ONLY!!) printout of proverb.c  (Pick it up later!)
29. Copy proverb.c to the file proverb.your userid.c
30. List the files in the subdirectory.

Complete the sections 31-37 working in step with a colleague if
    time does not permit in the lab.  Do 38 on your own.

31. Change the protection on your home directory and your cps125
       subdirectory using the chmod go+rx ... command to make
       its contents visible to other students.  chmod 744 . will also work.  
       Do ls -al before and after chmod; note the directory permissions 
       before and after chmod.
32. After noting the original permissions, change the protection
    on the proverb.your userid.c file so that your neighbour can
    copy it to his/her directory.  Do ls -al to note the changed
    file permissions.  
33. Copy your neighbour's file proverb.his/heruserid.c
34. List the files in your subdirectory. Deduce what happened.
35. Remove the copied file.
36. Repeat 29-35 twice; skip first 31, then 32.  Each time try
       to list the files in your colleague's subdirectory.
37. Change the permissions back to their original states to
       restore protections.  List files and check the
       permissions.
38. On Hopper type netnews.  Find news groups relevant to your
       Engineering discipline using /myarea* <ENTER> (*ask your
              professor).  Press y to "yank" in all groups.