-------------------------------- DAT2330 - Unix - Prof. Ian Allen -------------------------------- Here are questions you should be able to answer. You will likely find questions similar to these on tests and exams. Chapter 2 - Getting Started. Omit material related to the GUI and X Windows (e.g. xman, tkman). Omit material related to printing (e.g. lpr). Omit material related to the "joe" editor (p.32-36). Omit material related to the "info" utility. (There is an "info" utility on ACADAIX, but it is written by IBM. Floppix doesn't include the Linux "info" command.) Substitute the file /etc/passwd for the missing file /etc/termcap (text p.37) when practicing on ACADAIX. - "The best way to learn is by doing." Which chapters of the text are suitable for "learning by doing"? - True or False: Making a mistake as an ordinary user while learning Unix or Linux may damage the Unix system and crash it. - True or False: Making a mistake as the user "root" while learning Unix or Linux may damage the Unix system and crash it. - What are the answers to the relevant questions on page 20? You may find the output of the stty command helpful in determining the default erase, line kill, and word erase (werase) characters. Try this: $ stty all - Read the first three-line paragraph under the "Notes" heading on page 867. The default Korn shell (ksh) on ACADAIX also prevents some actions of the stty command from working. - Test each of the erase, word erase, and line kill characters. Do they all work as expected? Start up the C Shell "csh". Test the three characters again. Any differences? Start up the Bourne shell "sh". Any differences? (Type "exit" to exit a shell.) - What is the difference between a command (or utility) and a command line? - True or False: To avoid a syntax error you must type in the same prompt character as used by the shell at the beginning of all your Unix command lines, as illustrated in the textbook by examples such as: $ vi memo.1204 This example shows that you must type the dollar sign in front of all commands that you type into this shell. - True or False: You can end command lines in Unix either by using the TAB key, the RETURN key, or clicking the mouse. - True or False: The first prompt you see after logging in to a Unix system is almost always a text editor, such as "joe" or "vi". - True or False: The Unix password command has 6 letters. - How many virtual consoles are available on Algonquin's ACADAIX Unix system? - Floppix users: How many virtual consoles are configured into Floppix? - List three ways you can "back up" while typing a command, to erase characters that you have typed. Given the three shells "ksh", "csh", and "sh" on ACADAIX, which shells permit all three characters to function as expected? - How do you interrupt/abort a command that is in progress? - ACADAIX does not have the open source "less" command that is available on Linux to paginate output. What similar command should you use instead to paginate output to your screen one page at a time? - What is the name of the command that displays system documentation? - What command line do you type to get the system documentation that is related to the command that gives you the system documentation? - If you say "man ksh" on ACADAIX and then type the single letter "h" at the "(14%)" prompt at the bottom of the first screen, what happens? What program are you talking to when you type the "h"? (Hint: If this were Linux, it would be the "less" command doing the pagination. ACADAIX does not have "less". What program does it use instead?) - In which of the nine traditional sections of the Unix manual do you find manual pages for user programs (also called "utilities" or "commands")? (see your text, p.30) Note: The ACADAIX man command has its own special brand of "man" command that doesn't give pretty results. If possible use the "man" command on a real Linux system that has all the man pages online. - In which section of the manual do you find file formats (e.g. the format of the Unix /etc/passwd file)? (text, p.30) - What is the difference between the behaviour of "cat" and "ls"? NOTE: The file /etc/termcap (text p.37) is not present on ACADAIX. You will find the huge Unix password file named /etc/passwd to be a good substitute for practicing the pagination commands. Note the spelling of the file name. - The IBM proprietary version of its pagination command has some added features that make it resemble the description of "less" given in the text. Name one such feature. - What error message is produced from this command line on ACADAIX: $ cat "screen door" Is this message more or less clear than the similar error message shown for "cat" in the box on page 36 in your text? - Explain the differences in the error messages for the following two command lines (note the subtle difference): $ cat "screen door" $ cat screen door - What does "white space" mean? - Why should you avoid shell "special characters" in file names, e.g. "*"? - What does "quoting" or "escaping" a shell special character mean? - Chapter Review Questions: On ACADAIX or Linux: 1, 2, 3, 7, 8, 9, 11 NOTE: IBM has their own proprietary format for Unix man pages, unlike any other vendor. (The man pages are derived from an IBM proprietary document format.) For "real" Linux man pages, such as you would find on most any other Unix system except IBM AIX, telnet to a real Linux server or see the Linux Documentation links on the Web: http://www.linux.com/links/Documentation/ In Chapter 2, you learned a little about these Unix command names: passwd, man, ls, cat, less, more, rm You learned what these special characters do: CONTROL-D CONTROL-H CONTROL-L (bash shell only) CONTROL-U CONTROL-W CONTROL-C Most importantly, you learned that the "man" command can be a big help in finding out what commands do and what commands are available.