Lecture notes for Computer Science I by James Tam Return to the course web page

CPSC 231: Assignment 1

Raw score Letter
20 A
19 A-
18 B+
17 B
16 B-
15 C+
14 C
13 C-
12 D+
11 D
10 D-
< 10 F

New Concepts to be applied for the assignment

 

Introduction to UNIX, using common commands (20 marks)

On the UNIX workstations in the Computer Science lab complete the following steps:

  1. Login to your UNIX account

  2. Start a script session

  3. Show the contents of your home directory

  4. Show your location (path) in the UNIX file system

  5. Make a new directory called '231'

  6. Show the contents of your home directory

  7. Enter the newly created ‘231’ directory

  8. Show the contents of the newly created ‘231’ directory

  9. Show your location (path) in the UNIX file system

  10. Go to the official directory for CPSC 231 (/home/231)

  11. Show the contents of the CPSC 231 directory

  12. Show your location (path) in the UNIX file system

  13. Go to the directory for Assignment 1 (/home/231/assignments/assignment1)

  14. Show the contents of the Assignment 1 directory

  15. Show your location (path) in the UNIX file system

  16. Display the contents of the file called 'index.txt' onscreen.  Show the file one screen a screen at a time (with a prompt for the user to continue) rather than all at once.  [JT's comment: This step may result in a small amount of 'garbage' or nonsense text appearing on your paper printout.  If the garbage only appears for this step (partway through the display of this file) and/or each of your steps is clear enough for your marker to see each distinct step then you can still get full marks for this assignment.]

  17. Try to delete the 'index.txt' file [JT's Hint: you aren't supposed to be able to complete this step successfully but instead you should get an error message.]

  18. Copy the file to the newly created ‘231’ directory that you created in your home directory

  19. Go to the 231 directory that is located in your home directory

  20. Show the contents of the ‘231’ directory.  (It should include the file 'index.txt' now.)

  21. End the script session

  22. Submit your assignment (the file called "typescript" using the submission mechanism described on the course web page [Hyperlink]).