CS/CE 218 --- Unix and C Programming 28 August 91 LAB 1: UNIX ESSENTIALS The report for this lab is due 29 August 91 (tomorrow). In the report, write your answers to each question; these needn't be long. You don't have to write the questions again. Be sure to take notes (perhaps on this sheet), as you do the lab! 1. ``Breaking'' and Fixing the HP Terminals (9 points) a. What happens when you press the ``system'' key on your terminal? b. How do you turn the menus off? c. What happens when you turn the menus off and press function key F1? d. Is there any way to ``reset'' the terminal? (Try some combinations of keys if single keys don't work.) e. How do you put the terminal in a state where each of the ``function keys'' F1 through F8 control a ``mode'' of terminal operation? f. How do you know which of the modes are active and which are not? g. What modes have to be active/inactive to allow the terminal to work right? h. What is the baud-rate setting for the terminal? i. What happens when it is not set right? 2. Editing Your Input (5 points) a. Type in some text, and before hitting ``return'', edit it using the arrow keys, ``backspace,'' ``del,'' and any other keys that look helpful. Are the results what you expect? Which keys are safe to use, and which are not? b. Why do you think Unix recognizes some keys but not others? c. Type ``stty erase ^? oops'', and then erase ``oops'' from the line before you hit return; do you have to use delete (^?) to do this, or can you use backspace (^H)? d. Logout and log back in. When you log in, try editing your login name using delete (^?); can you edit your login with delete? e. When you get logged in again, what was your erase character? 3. Changing Your Password (4 points) a. What's the minimum size password the system will let you use? b. How many characters in a password are remembered by the system? 4. Reading Manual Pages (4 points) a. Type ``man man.'' At the bottom of the screen you'll see a highlighted ``--More--'', indicating that there is more text to be displayed. It won't hurt the computer if you experiment a little. Try to get help about what the program is expecting. What key lets you see a help message or more of the text? b. Is there some way to quit reading the manual page before you get to the end? d. List the section 1 commands on Unix that deal with ``arguments''. How did you find them? c. What is the output of ``man -k pain''? How is it related to ``pain''? 5. Command Syntax (5 points) a. How many spaces are allowed before a command name (such as ``date'')? b. What commands are related to the topic ``service name data base''? c. Are spaces significant in arguments to ``man -k''? d. How can you tell? e. How would you alter the command ``man -k at'' to only look for commands that contain the word ``at'' (as a separate word, not embedded in a string)?