Lab Assignment--Command-Line Linux
Part 1-Linux/Unix Commands
- from your home directory, start a script on linux
- if you don't already have one, create a directory called 'cs330'
- change your working directory to 'cs330'
- create a directory called 'lab1'
- change your working directory to 'lab1'
- make two new directories called 'web' and 'dir2'
- change the permissions of the 'web' directory to -rwx r-x r-x using the octal form of chmod
- change your working directory to 'web'
- create a file called 'f1.html'
- create a file called 'f2.html'
- change the permissions of 'f1.html' to -rwx r-- r--
- change the permissions of 'f2.html' to -rw- r-- r--
- check the permissions with ls -l
- create a directory called 'bak'
- copy both files in the current working directory to 'bak'
- rename 'f1.html' to 'testing.html'
- copy 'f2.html' to the 'dir2' directory that was created in step 6
- change your working directory to ~/cs330/lab1
- remove the 'dir2' directory and it's contents
- '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:
- Creates an array of five integers
- Initializes the array to values 1 through 5
- Cycles through the array and prints the values in reverse order
- Script of Part 1
- Code for Part 2
- Script showing compile and run of Part 2