Lab Assignment--Command-Line Linux


Part 1-Linux/Unix Commands

  1. from your home directory, start a script on linux
  2. if you don't already have one, create a directory called 'cs330'
  3. change your working directory to 'cs330'
  4. create a directory called 'lab1'
  5. change your working directory to 'lab1'
  6. make two new directories called 'web' and 'dir2'
  7. change the permissions of the 'web' directory to -rwx r-x r-x using the octal form of chmod
  8. change your working directory to 'web'
  9. create a file called 'f1.html'
  10. create a file called 'f2.html'
  11. change the permissions of 'f1.html' to -rwx r-- r--
  12. change the permissions of 'f2.html' to -rw- r-- r--
  13. check the permissions with ls -l
  14. create a directory called 'bak'
  15. copy both files in the current working directory to 'bak'
  16. rename 'f1.html' to 'testing.html'
  17. copy 'f2.html' to the 'dir2' directory that was created in step 6
  18. change your working directory to ~/cs330/lab1
  19. remove the 'dir2' directory and it's contents
  20. 'exit' from the script

Part 2-Create a Simple C++ program

The goal of this part of the exercise to get you used to the command-line compiler and C++ code again.

Create C++ code that:

  1. Creates an array of five integers
  2. Initializes the array to values 1 through 5
  3. Cycles through the array and prints the values in reverse order

Deliverables: