---------------------------------------------------- Chapter 3 Reading Guide - A Practical Guide to Linux ---------------------------------------------------- -IAN! idallen@ncf.ca Here is a Reading Guide and some review questions for Chapter 3 "Introduction to the Utilities". You will find questions similar to these on tests and exams. * Omit all material related to the "lpr" command and printing. * Omit all material related to the missing "pine" email program. * The file names mentioned in Chapter 3 are available on ACADUNIX under the directory "/thome/alleni/course/dat2330/03w/chap3/". You can copy them all to your account for use by using this command: $ cp /thome/alleni/course/dat2330/03w/chap3/* . The wildcard "*" matches all the files. "." is the name of the current directory (in both DOS and Unix). Once you do this copy, you can try the commands that use the files from Chapter 3. - how do you spell the name of the copy command in Unix? - does the copy command copy from left-to-right or from right-to-left? - can you use the copy command to copy two files into a third file? (Experiment!) - True or False: you cannot use more than one period in a Unix file name - what is the name of the command that renames a file in Unix? - does the file rename command work from left-to-right or from right-to-left? - What command do I use to find a string of text in one or more files? Use this command to locate the line in the file /etc/passwd that contains your userid on ACADUNIX. How many colon-separated fields are in the line you found? - what command would show me the top five lines of a file? - what command would show me the last line of a file? - what command name sorts a file (in character, not numeric, order)? - what command removes adjacent duplicate lines from a file? - What command compares two text files and shows the differences? What do the "a", "d", and "c" characters mean in the output? What do the "<" and ">" characters mean in the output? - What does the command "file" do? What is the output of this command line: $ file . - How do I put a line of text onto my terminal screen? - what command shows me the current date and time? - What does "gzip" do to a file? (Try the examples!) How do I reverse the process? (Try the examples!) - How do I look at a compressed file on my screen, as plain text? - What does the "|" character do between two Unix commands? - True or False: "gzip" is the Unix name for the "zip" program. - What kind of file ends in the extension .tar.gz or .tgz ? - What files are contained in the xgrabsc.tgz file on ACADUNIX? (See above for how to obtain these practice files.) - True or False: the "gzip" program has always been part of the "tar" program. - Does the ACADUNIX "tar" command have the built-in "gunzip" decompress feature mentioned in the text? Does the Floppix "tar" command? How did you find out? (Experiment!) - ACADUNIX does not have an "info" command. Try "which wget" instead. Also try "whereis date" and "whereis cat". (The ACADUNIX version of "whereis" is broken and cannot find the manual pages!) - What is the "apropos" command used for? (This command may not work properly on ACADUNIX until the system admin rebuilds an index file.) - On ACADUNIX, you can say "finger alleni" (or you can finger any other account on the machine). ITS does not permit you to finger accounts on other machines. - The commands "w", "who", and "finger" show what kind of information? - How do you use the write command on Unix? - Does write set up a one-way or two-way communcation stream? - The "talk" command will not work properly on ACADUNIX unless you set your terminal type first: $ TERM=vt100 $ export TERM $ talk abcd0001 ITS does not permit the talk command to work between machines. - how do you turn off those annoying messages that people are writing to you all the time? - On ACADUNIX, read the output of "man mail" to learn about the IBM version of the traditional UCB Mail program. Floppix also uses a version of the UCB mail program. (This mail program was written in the early 1980's.) You can use this simple program to send and receive local email on ACADUNIX and on Floppix. - Chapter Review Questions: On ACADUNIX or Linux: 1, 2, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15 Start keeping a summary sheet of Unix commands that you have learned. You will find this very helpful on tests! In Chapter 3 you learned a little about all of these command names: cp, diff, file, grep, head, mv, sort, tail, uniq, compress, gunzip, gzip, zcat, tar, apropos, whereis, which, finger, w, who, mesg talk, write, date, echo (This list came from summary pages 63-64 in the text). NOTE: Algonquin ITS prevents anyone from using the "finger" or "talk" commands between computers on campus.