Deliverables

Open the following in separate terminals for marking:

Back to Schedule

Lab Content

Quick Links

Homework:

Go through Introduction

 

  • Preparation
  • Programming Exercise
  • Unix/Linux Command Exercise

To Prepare

Create a directory for this lab (you might have already done part of this):

  1. ensure that you are in your home directorytooltip

  2. make a directory called cs115tooltip

  3. change to the directory created in step 2tooltip

  4. make a directory called lab1tooltip

  5. change to the directory created in step 4tooltip

If you use the pwd command, where are you?tooltip

Practice Using Unix/Linux

You decide that you would like to organize your work better. You want to put all of your code from the previous programming exercise into a "Part1" directory. You would also like to back up your current work into a "BAK" directory under the "Part1" directory. If you feel comfortable with this, then start a script and go for it!

Otherwise the following is meant to help you

Move your work into a new directory called "Part1"
  1. make a directory called Part1
  2. for each file, use the mv command with the syntax:
    • mv filename directory
Back up your work in "Part1" into a directory called "BAK"
  1. change into the Part1 directory
  2. make a directory called BAK
  3. copy your .cpp code into the BAK directory the syntax will be:
    • cp filename directory

Feel free to use pwd and ls to check your work as you go.

Don't forget to end your script

exit
script practice_unix.log
./program
g++ program.cpp -o program

/home/hercules/y/you/cs115/lab1

where y is your username initial and you is your username

cd lab1
mkdir lab1
cd cs115
mkdir cs115
cd