In this lab, you will accomplish several things:
mkdir cisc181
This will create a directory called cisc181, in which you can store your files for this course. If you type "ls" immediately after doing this, you will see the new directory listed among your files. Since this directory is "under" the home directory, we call it a "subdirectory" of your home directory.
mkdir lab00
mkdir lab01
mv lab00.dat ~/cisc181/lab00
mv lab00.cc ~/cisc181/lab00
mv lab00.txt ~/cisc181/lab00
(Note that there are several shorter ways to accomplish this same task that involve less typing. After reading over Chapters 6, 7 and 8 in Anderson, you may be able to come up with some of these.)
cp ~pconrad/public_html/cisc181/04F/labs/lab01/lab01a.cc .
The "cp" command in Unix is used to copy a file. The file is copied
from a directory under Prof. Conrad's home directory. Note that ~ by itself
refers to "your home directory", but "~pconrad" refers to "pconrad's home
directory". Similar, you can refer to any user's home directory on strauss
if you know that user's login name; e.g. jsample's home directory can be
accessed via "ls ~jsample". cp ~pconrad/public_html/cisc181/04F/labs/lab01/lab01a.cc ~/cisc181/lab01
cat lab01a.cc
g++ lab01a.cc
./a.out
Did you get it right? Note: you could also have done "more lab01a.cc"
in the first step (if the file is too large to fit on the screen all at once),
and "CC lab01a.cc" for the second step. cd ~/public_html
<html>
<head>
<title>Joe Sample's Web page</title>
</head>
<body>
<h1>Joe Sample's Web page</h1>
I had to do this <b>web page</b> for my
<a href="http://udel.edu/~pconrad/cisc181"> CISC181 class</a>. Right now it is
pretty lame, but I hope to make it better later.
</body>
</html>
|
Here's what that looks like once it is formatted by a web browser:
Joe Sample's web pageI had to do this web page for my CISC181 class. Right now it is pretty lame, but I hope to make it better later. |
chmod -R a+rx ~/public_html
http://copland.udel.edu/~userid
If it doesn't come up, make sure you set all your file permissions correctly.
The most common problem is not doing the "chmod -R a+rx ~/public_html" command.
If you did that, and it still doesn't work, check with your TA or with
a classmate for help.
<html>
<head>
<title>Joe Sample's CISC181 Web page</title>
</head>
<body>
<h1>Joe Sample's CISC181 Web page</h1>
<p>I had to do this <b>web page</b> for my
<a href="http://udel.edu/~pconrad/cisc181"> CISC181 class</a>.
</p>
|
Here's what that looks like once it is formatted by a web browser:
Joe Sample's CISC181 Web pageI had to do this web page for my CISC181 class. Part of this page is to make a web ring. Here is a picture of me: |
cp ~pconrad/public_html/cisc181/04F/studentImages/jsample.jpg ~/public_html/cisc181
repeat this step with several different inputs
cd ~/cisc181/lab01
pwd
ls
cat lab01a.cc
cc lab01a.cc
./a.out
exitto end the script
Check your reading assignment in WebCT and catch up on your reading. Also, complete pre-lab exercises listed at http://udel.edu/~pconrad/cisc181/04F/hwk/ple02.html and be prepared to turn them in at the beginning of next week's lab.