Lab Assignment--Command-Line Linux


Part 1-Linux/Unix Commands

Follow all of the steps:
  1. log onto Linux
  2. start a script in your home directory
  3. in your cs330 lab directory create three new directories named 'weather', 'assignment', and 'web'
  4. change the permissions of the directory 'web' to -rwx r-x r-x using the octal form of chmod
  5. change your working directory to weather
  6. without using a text editor create three files called 'today', 'tomorrow', and 'deer'
  7. check the permissions with ls -l
  8. change the permissions of 'deer' to -rwx r-- r--
  9. change the permissions of 'today' to -rw- r-- r--
  10. check the permissions with ls -l
  11. create a hard link of 'deer' and name it 'good'
  12. check the hard link with ls -i
  13. create a directory named 'cars'
  14. move the file 'good' to the directory 'cars' and rename it 'today2'
  15. change working directory to 'cars'
  16. create a symbolic link to today2 and name it today3
  17. check permissions with ls -l
  18. move up one directory
  19. remove the directory 'cars' and its 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. Declares an integer pointer.
  2. Allocates space for 5 integers and points to it.
  3. Initializes the integers to values 1 through 5
  4. Loops through the integers and prints the values in reverse order
  5. Deallocates the space for the 5 integers.

Deliverables: