|
LAB ASSIGNMENTS |
Lab 1 - Work through
chapters 1 & 2 in the UNIX text. Read
and work through the tutorial on the vi editor in both the text and the UNIX
help pages:
http://unixace.csi.cuny.edu/csiunix/index.php4
Use the vi editor to write a C++ program that mimics the UNIX
man command. The program uses argc and
argv to read a word from the UNIX shell command line. The use of argc and argv can be found in most C++ texts. The "word" can be any of the
following UNIX commands: ls man
vi mkdir cd
cat pwd rm rmdir
passwd. How to compile and run C/C++
programs in unix can be found on the UNIX help pages.
The program will output an explanation of the UNIX command.
For example, if the program is called manual.cpp, then the
command:
$ manual cd
will print:
cd UNIX command that
changes to root directory. When
specified with a directory name cd changes to directory name. cd ..
changes to the parent directory.
Lab 2 - Read chapter 3
in UNIX text. Read UNIX help pages and
chapter 2 on file permissions. Do
Exercise at end of chapter 3 #1,2, and
4