|
Lab 1 (Chapter 0)
Learning Objectives
Lab Work
C OOA O OA CA Answer Sample - $ lpr –Pspr –n 3 proposal.ps Command line
1. $ ls -la convert.txt
2. $ more convert.txt
3. $ pwd
4. $ cat file1 file2 file3
5. $ rm -r temp
6. $ ping –c 3 cse.ogi.edu
7. $ telnet cs.berkeley.edu 13
8. $ cc -o short short.c -lbaked
9. $ chmod u+rw file1.c
10. $ uname –n
Your method of logging-in and out is most similar to which general connection category, LAN(Intranet), Internet, or Stand-Alone? Be specific in your answer about why and at what point(s) or stage your method is most similar. Also carefully list the differences between your connection method and the general connection categories. If your answer from above is LAN(Intranet), which method is it most similar to, i.e. UNIX Terminal, PuTTY, or Telnet client which are shown in Sections 0.3.1, 0.3.2, and 0.3.3 of the textbook? Be specific in your answer about why and at what point(s) or stage your method is most similar. Also carefully list the differences, and at what point(s) or stage these differences exist, between your method and the methods shown in the textbook. If your method of connection is completely different from anything shown in Section 0.3 of the textbook, try to give a descriptive name to your method. For example, we regularly connect to a UNIX system via HyperTerminal on a Windows XP computer, using a dial-up connection through a phone modem. It is not an Internet, or Stand-Alone category connection, but is really an offshoot of the LAN connection category. We could call this a Dial-Up Connection. Add your descriptive name as a title to your list from above.
a. $ ls b. $ pwd c. $ xy d. $ cd .. e. $ pwd f. $ cd g. $ pwd h. $ cd /usr/local i. $ ls j. $ cd
Using the figures found below, and the file maintenance commands covered in Section 0.4 of the textbook, create a directory and file structure under your home directory on your UNIX system exactly as shown in each figure. A directory is represented in the figures as a rectangle, and a file is represented as a circle. Then, write down a list of exactly what commands you used in sequence to create the structure for each figure. The directories and files that already exist in your home directory before you begin are irrelevant for our purposes in these exercises. In the event that directories that already exist in your home directory before you start any exercise have the same exact names as any of those shown in the figures below, then simply make up your own names for what is shown in the figures, and create the structure using your own names. Hint: You can always use the pwd and ls commands at any point in the construction process to verify the fidelity of your structure. Once you have finished building each structure, use the appropriate file maintenance commands from Section 0.4 of the textbook to completely undo what you have done above. Then write down a list of exactly what commands you used in sequence to undo the structure for each figure. "Undo" means delete the directories and files created for that figure, except for files 1st and 2nd. The files 1st and 2nd must remain in your home directory after you have undone the directory and file structure for any particular figure, so that you can use them to create the structure for the next figure.
In preparation for the next exercises, view and make notes about the use of the lpr or lp commands on your UNIX system by viewing the man pages for those commands. Note that if your UNIX system has another print command available that your instructor recommends you use, then substitute this command, and its syntax and procedures, for the lpr or lp commands in the exercises below. For example, our UNIX system has a macro command named "print", which allows you to do the same thing as the lpr or lp commands.
|
Back to
CS140U Homepage |