CS110-130 Lab #2 In-lab Exercise:

Objectives

There is a lot to learn in the first two weeks of any class. Start by learning these basic skills so you won't be lost.

References

NOTE:

  1. This exercise will be marked in the lab.
  2. If you need help during the week, you are welcome to go to CL119 during Office Hours posted for lab instructors. They will also be able to help you there if you have a problem with your PC/hyperion and Hercules account.
  3. The Programming Help Sessions are in CL119 from 1:30 p.m. to 4:30 p.m. on Saturdays and Sundays during the period of Sept. 22 - Nov. 25, 2001.


Exercise: login to hercules and then ---
Do the following in order Explain what the left side is doing
pwd Show the current working directory 
cd bring you to your home directory 
pwd  
mkdir  cs110 or mkdir  cs130 Make directory cs110 or cs130 
ls   -l  
cd  cs110 or cd  cs130  
ls  -l  
pwd  
mkdir  labs  
mkdir  assignments  
cd  labs  
pwd  
ls  -l  
mkdir  lab1  
mkdir  lab2  
mkdir  lab3  
cd   ../assignments .. means the parent directory 
pwd  
ls  -l  
mkdir  assignment1  
mkdir  assignment2  
mkdir  assignment3  
cd   ../labs  
ls  -l  
pwd  
cd  lab2  
ls  -l  
cp   ~/hello.cpp   ./ Copy hello.cpp from home directory to the current directory 
ls  -l  
CCstd  hello.cpp -o hello Compile C++ program hello.cpp and
save the executable file as hello 
hello Run C++ program hello.cpp 
ls  -l  
pico  sampleio.cpp
Type in the contents of sampleio.cpp
Create a text file sampleio.cpp 
Ctrl-o   To save the contents just typed in 
Ctrl-x   To exit pico editor 
CCstd  sampleio.cpp -o sampleio  
script  sampleio.log  
CCstd  sampleio.cpp -o sampleio  
sampleio  
exit  
cat  sampleio.log  
more  sampleio.log  

Show your lab instructor the file sampleio.log you just created. You will be marked according to your performance.


This page last modified:
Thursday, 06-Oct-2011 12:13:32 CST
Accessed     times.
CS Dept Home Page CS Dept Class Files CS110-130 Class Files
Copyright: Department of Computer Science, University of Regina.