Eunchs 'R Us or a novice's guide to UNIX By Sam Choi For C.L.U.F.L. members and associates Styles = This is a placeholder; you need to supply a word here. Inside the braces I will try to type something descriptive. E.g. means that you need to supply a filename in this place. When you see "{man }" I am indicating how you can get more information about this topic, e.g. "{man stty}" When I am referring to an actual key on your keyboard, I will use brackets []. E.g. [q], [escape], [space]. Where more than one keystroke is required, I will often use quotations ("babble") to indicate something that you can type on the computer instead of the brackets []. E.g. instead of saying type [m][a][i][l][return], I will say type "mail"[return]. I will also refer to actual filename (as opposed to ) with quotes, e.g. ".profile" General Navigation Ok, your unix account requires configuration file . . . in most shells, this is called ".profile" while in csh it is call ".cshrc." This contains stuff about the size of your screen (so it will know how many lines to give you at once) {man stty} or where you mailspool is or what paths you have and all sorts of other random stuff. First of all, the machine has several disk drives and many many directories . . . you can look through most of these. A note about directories: In case you are not familiar with either Macintosh HFS or MS DOS, Unix directories are organized more or less in a way called "hierarchial." This means that directories can be nested within directories, which can in turn be nested within directories. The outermost layer (highest in the hierarchy) is called the root. The most important commands for getting around are cd {man cd} and ls {man ls}. Cd stands for change directory. There are basically four basic ways of using the cd command. 1) "cd stuff" will take you from your current directory to a directory within your current directory called "stuff." In other words, in order for this to work, you must see a directory called "stuff" when you type "ls." 2) "cd /usr/bin/stuff" will also take you to the directory called stuff, but it is not nested within your current directory . . . the first slash indicates that you are providing the entire pathname from the root directory (the outermost in the hierarchy). 3) "cd .." will take you one level back, for instance, if you are in a directory "/u/schoi/things/stuff" and you type "cd .." you will be transported to "/u/schoi/things." 4) "cd ~/stuff" will take you to a folder called "stuff" in your home directory (~ stands for home, and home usually means something analogous to /u/schoi). Additionally, two things to remember to make navigating a bit easier: 1) typing simply "cd" will get to you to your home directory and 2) typing "cd -" will get you to the directory you were just in before just changing. Ls, I guess, stands for list. This will list all the files in the current directory. There are a number of flags (-) that you can invoke to modify your command. For instance, "ls -a" will list all the files in your directory. Normally "ls" will only list normal files. Most specifically, it will list the files which are preceded with "." Ls not normally display any file with a "." as the first character as a way of keeping your directory listing relatively uncluttered . . . you will notice that all system files are preceded by a "." such as .profile, .cshrc, .rnrc, .mailrc, etc. Normally you don't really need to see all of these, so having a "." before them hides them in the normal view. "ls -l" will give you additional information about each file. Here's an example: -rw-rw---- 1 schoi guest 29177 Sep 22 19:59 gutenberg.wn drwxrwxrwx 2 schoi guest 1024 Oct 17 1922 keats/ -rwxr-x- -- 1 schoi guest 139384 Feb 19 1921 kermit* lrwxrwxrwx 1 schoi guest 6 Oct 2 19:50 cores -> /cores/@ Working backward, the rightmost field is the file name. Normal files have no suffix. Directories have a "/" as a suffix. Executable files have a "*" And finally, links have this weird thing that you see here. Reading it from left to right, it is the name of the file or directory (called cores here) the "->" which means, "linked to:" and then the full pathname of the original file or directory. As you see, I have one of each type here. Next is the date and time this file was last modified. Next is usually the size in bytes (Michael adds, that depending one the flavor of unix you are using, it could be in blocks or other units). In case you were interested, 1K=1024 bytes. A byte is 8 bits. A bit is a binary unit (either 1 or 0). In weird cases, there're nibbles, which are 4 bits. (Get the computer-geek humor? A nibble is half a byte/bite). Next, is the owner and group of the owner . . . I thought this next number is the number of links associated with this file or directory . . . which is weird, 'cause my directory "keats/" shouldn't have any other links . . . so I'm probably screwed. And finally, all this jargon . . . here's how to read the jargon . . . (type) (own read) (own write) (own execute) (grp r) (grp w) (grp x) (other r) (other w) (other x) The type can be: 1) "-" for normal file" 2) "d" for directory 3) "l" for link 4) "c" for character special 5) "b" for block special. Now the next nine (own read, own write . . .) are really divided up into three sets of three describing file permissions. The first set of three refer to the owner of the file. If there's an "-" in this position, it means that the permission is denied. If there's an "r" (the first of the three) "w" (the second) or "x" (the third) there, it means that the permission is granted. If you look at my "gutenberg.wn" file, you will notice that I, the owner can read and write to it, and that people in my group can read and write to it, but "others" cannot . . . No one can execute this file because it is just data . . . Now here's the interesting part. If you are the owner of a file or directory, you can decide how much permission to grant . . . this is with the command chmod {man chmod}. If I wanted to change thepermissions on my file "gutenberg.wn" so that others could read it, I would type: "chmod o+r gutenberg.wn" The abbreviations are as follows: u=you, g=group, o=other, a=all (all three), +=give permission, -=deny permission, r=read, w=write, x=execute. There's also a numeric way of doing it . . . Michael adds that he would have typed "chmod 660 gutenberg.wn" to set up the current permissions that you see (think binary, or you can read the man pages). There are other things like sticky bits, suid, sgid, semaphores, pipes . . . but I won't talk about them since you probably won't be installing any software on these machines. You can also give away ownership to a file with chown. If I wanted to give way permission to my file "gutenberg.wn" to a user named tjones whose main group is "jerks", I'd type "chown tjones.jerks gutenberg.wn" (you can leave off the group). This is basically a silly thing to do . . . but you might want to know in case you become system administrators . . . then you will want to do this on occasion . . . the system administrator can assign ownership of any file to anyone. You can delete files with the command "rm" {man rm}. For example, "rm gutenberg.wn" Since rm is a rather permanent kinda thing, Michael has set the global default to interactive mode. What this means is that the computer will ask you whether you are sure you want to delete this file. Type "y" and [return]. To delete an empty directory you use the command "rmdir" This will not work if anything is in the directory . . . this is a safety feature so that you don't accidentally erase something because it was not where you thought it was . . . now you can circumvent this safety feature with "rm -r" which means that it will recursively delete that directory and everything in that directory. Another safety feature is the flag "-i" (stands for interactive). If you type "rm -ri stuff" the computer will go through each file in the directory "stuff" and ask you whether you want to delete it . . . this is much faster than typing "rm " for each file, but safer than just "rm -r stuff" To move a file from one directory to another, use the command mv {man mv}. You have the option of supplying the entire pathname (e.g /u/schoi/stuff) or just the name in your current directory. I usually supply the entire pathname to make sure there is no ambiguity. This is also the easiest way to rename a file. For instance I want to rename a file "junk" to "coolstuff" I would type "mv /u/schoi/junk /u/schoi/coolstuff" To look at the contents of a file, type "more" {man more}. This will display the file one screen at a time. [return] will give you one more line, [space] will give you one more screen. You'll notice a "--More--(50%)" or something . . . this is the percentage of the file which you have seen so far . . . if after having seen a certain portion, you decide that you've seen enough, you can type "q" and get back to the shell. Another command is "less" As of this point, I couldn't find man entry for less, but according to Michael, it's more than more . . . but it didn't perform very well for me. If you want to look at the whole file without stopping, use "cat" {man cat}. Cat actually has another use . . . if you type "cat stuff" it will simply display the contents of the file. If you type "cat stuff > junk" it will create (or replace) a file called junk with the entire contents of stuff. "cat stuff otherstuff > junk" will put all the contents of stuff and otherstuff into a file called junk. If a file called junk already exists and you don't want to lose the contents of it, but you want to append the contents of the file stuff, then type "cat stuff >> junk" The ">>" says "append, don't replace." Finally, if you type "cat - > junk" the computer will put everything that you type into a file called "junk" until you hit [control] [d]. Mail Ok, here's probably why you have this account. To simply read your mail, type "mail" {man mail}. This will give you listing of all your letters. Just type the number of the letter you want to read. The mail program should display only one screen at a time. It will wait for you to type [return] . . . tricky here, remember, [space] for a screen's worth in "more", [return] for a screen's worth in mail. This is because mail defaults on a different pager . . . you can have mail use "more" as a pager by changing your .mailrc file (more on this later). When you reach then end, you can type [x] at the mail prompt (&) and you will exit the mail program. This will also retain your letter in the spool so that it will be there the next time you read mail. If you decide that this letter is somewhat important, you can save the letter as a file by typing "s " at the mail prompt. After doing this, you can delete the letter by typing [d] [return] and [q] [return]. [q] will also quit the mail program. If you want to delete multiple letters, you can type "d 2 5 9 14" which will delete letters 2,5... then, of course, you must type [q] to complete the process. Hitting [x] to exit the program, even after [d] deleting some letters, all letters will be retained in the spool. If you type [q] without [d] you will delete the letter from your mail spool and save it in a file called "mbox" What this means is that you will no longer see that letter when you enter the mail program. You can look at those letters in your mbox by typing "mail -f mbox" Alternatively, you can always read it by using "more mbox" (see above for instructions on the command "more") while in the normal shell. To send a message to someone, you type "mail
" You can also type the same letter to several people by typing "mail " When typing your letter, you should hit [return] at the end of each line. If you need to correct something in an earlier line you must type, at the beginning of an empty line, "~e" You will now be in vi {man vi} which is a text editor I will explain below. If you don't like vi, or already know an alternative editor (e.g. emacs) you can include the line "EDITOR=emacs; export EDITOR" in your .profile. When you are done with the letter, type a "." (period) at the beginning of a line and hit [return] the prompt cc: is an opportunity to send a carbon copy to someone else . . . many people send cc's to themselves to remind themselves what they wrote. You can send the contents of a file to someone by typing "mail
< " (in case of confusion here, the
is the email address you want to mail to, the "<" is very important, is means "taking information from:" and is not a brace that I am putting around ) This also works with multiple addresses. If you want to include the contents of a file in a letter, but also want to introduce, preface, afterward or whatever, then type "mail
" as you normally would an type your letter as you normally would. At the point at which you want the contents of that file to appear, type "~r " at the beginning of a line. If this worked correctly, the computer will echo back the name of that file along with / in the file, eg "stuff 77/1951" You can reply to a letter that you received by typing "r" in the mail program at the mail prompt (&) after reading the letter. This will automatically address the letter to the sender and all others included in the cc list and will subject the letter "re:" If you want to send a letter to only the author of the letter and not to all the others included in the cc list, type "R" (capital r). Mail has its own help file, so in addition to the man entry, you can type "?" while in the mail program and it will give you a short list of what you can do. The .mailrc If you've been paying attention, you will know that this file is going to be an invisible file . . . well, not all that invisible . . . this file can contain all sorts of administrative stuff, like "ask" "askcc" "askbcc" "dot" "hold" "metoo" and random stuff . . . but the most interesting part of it is the aliases. What you can do is set up a set of alias for the people you mail to most often. So instead of typing "mail mwu@orion.oac.uci.edu" I can type "mail matt" because I've set up an alias called "matt" which signifies the address "mwu@orion.oac.uci.edu" The real power of aliases is in recursion. I have an alias called pool, so when I type "mail pool" it mails the same letter to my friends Matt, Bill, David, Brian, Eric, and Dan. Once you've set up an alias, you can then use that alias as if it were an address in other aliases. For example: alias moe dwhite@ccat.sas.upenn.edu alias larry mcshane@ccat.sas.upenn.edu alias curly vzimm@rm105serve.sas.upenn.edu alias stooges moe larry curly If I type "mail stooges" the computer will send letters to Dan, Mike and Van at each of their respective addresses. You create the .mailrc file with a program called vi, which I mentioned before. vi Ok this is a text editor. You have to find the manual for vi (there is a man entry, but it's not much) for a full list of commands, but I only use a half a dozen of them. First of all, there're two modes in vi . . . one what I call the cursor control and one I call the insertion. You toggle from insert mode to cursor control mode by typing any of [i], [a], [A], [o], or [O]. To toggle from insert mode to cursor control mode, hit the [escape] key. To begin, type "vi <filename>" The filename can be an existing file or a new one. If the file already exists, you will be modifying it and will want to scroll up or down in the file until you find the place where you want to start typing . . . do this with the cursor control keys. h=move left, j=move down, k=move up, l=move right. For more complex moving, there's w=word forward, b=word backward, G=go to the end of the file, 1G=go to the beginning of the file, <number>=go to that line of the file, and <number> <direction>=move this number of units in this direction (e.g 20j=move 20 lines down). In addition to moving around you can, x=delete a character, r=replace a character, dd=delete this line, <number>dd=delete this number of lines down, D=delete the remainder of this line, yy=copy this line into the buffer (for mac users, copy line), p=put buffer after cursor (paste), P=put buffer before cursor, m<any character>=mark the cursor position with this character, y'x=yank block between the current cursor position and the mark you just made (m<character>) (for mac users, this is like a copying a block of text), !<command>=execute a unix command, !!<command>=replace this line with the output of this command (the most obvious one being "more"), /<words or whatever>=find these words or whatever. When you've reach the place you want to start typing, hit [escape]i. ("i" for insert). Then just type away. At any time, you can hit [escape] and move up or down in the text with the cursor control keys I've given you above. When you're done with the file, type <escape> [:] [x] to save and exit vi. You can save what you've done at any point by typing <escape> [:] [w]. Other commands are <escape> [:] [r] for read and <escape> [:] [e] for edit. You can start vi up with a whole list of files and edit each one in sequence until you're through the list. Rn There're about 2000 newsgroups which are generally available . . . this says nothing about the hundreds of local news groups . . . either for classes at upenn or for the state, or what not. To read these groups, type "rn" {man rn} Now if you plan on reading these groups with any frequency, you will probably want to spend a couple of hours unsubscribing to the 1900+ groups you don't want to read. Do this with [u] when the computer says something like "comp.sys.next.misc (2100 new articles) read?" Type [u] here and you will never see this newsgroup again. Alternatively, you can type [N] to unsubscribe to all the newsgroups and subscribe to them one at a time with [g] (see below}. Another strategy is to position all the groups you want, in order of preference. Do this with [m] for move. At the prompt (like the one above) type [m] [return] and then a number. This number is the position of the group. [1] (number one) will make it the first group to come up each time you enter the rn program. Use [g] to go to a group wherever it is. i.e. "g alt.sex.stories" From there you can either start reading the articles (hit [space]) or move it (m) or unsubscribe (u) or list the article titles (=). If you decide that you are interested in a group, but don't want to read the 3000 or so back articles, you can type [c] for "catch-up" which will mark all the articles in that group as "read" so the next time you enter the rn program, you will only see the articles which have been posted since you typed [c] (some groups receive over a hundred messages a day). You can list only the groups with certain words in the name, e.g. stuff about sex by typing "o sex" The program will then list only groups (to which you are subscribed) with the word "sex" in them e.g. alt.sex.bestiality, alt.sex.stories, alt.sexy.bald.captains . . . use [n] and [p] to go to the next and previous news groups. You can negate this restricted listing by typing [o] again with nothing after it. If you want to include those groups to which you are not subscribed in this search, you can use [a] instead of [o] . . . to read these other groups, though, you would then have to subscribe to them. If after reading an article, you decide that it was so repugnant that you don't want to hear anything more about it, you can type "k" (for kill) which will go through the entire list of messages and delete all the ones which are follow-up articles to that one (most articles are follow-ups. The common term for a series of articles which all followup one another is a "thread"). You can also save articles you like by typing "s <filename>" These files will be standard text format and stored in a directory called "News" in your home directory. To see them you must "cd News" Remember this when you are including it in a letter to a friend as I often do . . . you must type "~r ~/News/<filename>" (if you are already in your home directory, then you don't have to type [~] to signify home directory) and not just "~r <filename>" If the filename already exists, this will append the article to the current file. With a number of these commands, you can specify a range of articles to perform the same command on all of them. For instance, if you want to save a number of articles, you can type "<article number>-<article number> s <filename>" This will create a file with all of these articles in it. Be careful with this command, if you get the article number wrong and type something like "200-2500 s articles" you'll create an enormous file with 2300 articles in it. Specifying a range can also be a useful alternative to the [c] command . . . if you want to get rid of all the really old messages, find out what the last article number is, say 5000, and type something like "2000-4900 j" This will "junk" all the articles from number 2000 through 4900, leaving you with only the 100 most recent ones. You can send an email message to the person who posted the message by typing [r] at the end of the message. If you type [R] the program will include the entire article at the beginning of the letter . . . which is basically good so the person will know what you're talking about since people sometimes post on more than one group or on more than one topic. You can write an article which addresses the article you just read by typing [f] for followup. As with the reply, typing a capital [F] will include the article in your article. Here you should note that it is proper usenet etiquite to edit down your quote to only the most relavent parts since people will have already read the original message and will not want to have to read it all again in your article. People yell and scream about bandwidth, but that's not really the big deal, it's really having to pan through tons of quoted material before getting to anything new . . . some versions of Pnews (Pnews is the actual program which posts an article to the news groups) {man Pnews} will reject your article if more than 50% of your article is quoted material. Rn, like mail, has its own help files . . . you can type [h] at virtually any point for a list of options. There are several different levels of help . . . when you have the prompt that looks like: "******** 5 unread articles in general--read now? [ynq] ?" you can do a certain set of things and when you have the prompt "(Mail) End of article 6997 (of 7251)--what next? [npq]" you can do a different set of things. The help files will differ depending on the prompt. To exit rn, you must press [q] If you were reading messages, you will have to press [q] twice, once at the prompt that looks like this: "(Mail) End of article 6997 (of 7251)--what next? [npq]" and then once again as the prompt like this: "******** 5 unread articles in general--read now? [ynq] ?" Fun stuff "talk" {man talk} is kinda amusing . . . by typing "talk <address>" (the email address of a person) you can type to that person . . . this, of course, presumes that that person is online. Just type away; everything you type will be on the top part of your screen and everything your friend types will be on the bottom part of the screen. When you are done, type [control] [c] to get back to the normal mode. Now as you noticed, it wouldn't be very productive to try to "talk" with people who are not online. You can usually find this out by typing "finger <address>" This will tell you whether or not the user is online, the real name of the user and other random information. Some machines have accounting software running so it will tell you the date and time of that person's last login, when that person last read mail, whether that person has any unread mail waiting . . . Incidently, the finger command will try to read a file called ".plan" This is just a text file that you can modify with vi. In it you can write whatever you want about yourself . . . basically free advertising for those of us who like complete strangers to know about our lives . . . no seriously though, the other person probably wouldn't have your email address to finger in the first place if he/she didn't have some sort of business knowing you. A similar command is "write" but you can call a command by typing [!] <command> at the beginning of a line (again, the most obvious one is "more" so you can have a person see a file . . . but I'm sure it's possible to be pretty obnoxious here . . .) Whois Everyone will agree that email is pretty cool, but the problem is that it all presumes that you already know everyone's email addresses. For a complete list of ways to find email addresses, you should check the soc.college newgroup . . . someone periodically posts an FAQ (Frequently Asked Questions) which explains all the ways of finding addresses. One quick and easy way (although not fool-proof) is to use the "whois" command {whois}. What this command will do is access a name server (a computer which is set up with huge files with lists of names and email addresses) and search for the name that you give. For email addresses at Penn, type "whois -h whois.upenn.edu <name>" "whois.penn.edu" is the name of the Penn nameserver. The name that you provide can be a first, middle or last name . . . in fact, when I typed "whois -h whois.upenn.edu ben" I not only got the address of a Ben I wanted but also "Benford, Edward" and "benefits" along with some dozen other Ben's. Unfortunately, the whois name server at Penn is hardly exhaustive and not necessarily up to date . . . for example, when I tried to find myself, it didn't list any of the three accounts I have on the sas sub-net, but did list an old account I used to have in the math department . . . I mailed some people about this, but didn't get a response yet. For email addresses outside of Penn, you can try this same command with different nameservers . . . the nameservers of a couple of universities that I happen have on hand are: syr.edu (Syracuse University), acfcluster.nyu.edu (New York University), ucsd.edu (UC San Diego), stanford.edu (Stanford University). Let's take the example of trying to find Marjorie Garber's address at Harvard. Something I'd try is either "whois -h harvard.edu garber" or "whois -h whois.harvard.edu garber" (I tried this; it turned out that the correct name of the nameserver is whois.harvard.edu but it didn't have an address listed for her). Finally, there's nic.ddn.mil which is a national name, host, domain, etc server. (Again, this is not entirely up-to-date and not necessarily exhaustive). What you can do with this is not only to find names, but also companies, universities, etc. I've used this more than a couple times to see whether a company I wanted to contact had an email address . . . This is also useful to find the addresses of universities since it's not always obvious how a university would abbreviate its name, e.g. upenn instead of penn or upennsylvania . . . or ucla but berkeley. You can use nic.ddn.mil as the host in the "whois" command, but you might find it more useful to actually login; use "telnet nic.ddn.mil" There's extensive online help at every point once you login to nic.ddn.mil if you just type "?" so I won't try to go through it here. Administrative stuff If you're online, say, typing a letter and your phone line goes bad on you and you get knocked off, in all likelihood, your unfinished letter was saved in a file called dead.letter or sometimes .letter. You can edit this file with vi or you can include it in your letter with either "~d" (if the filename is dead.letter) or "~r <filename>" if the file name is anything else. Generally, if you see a dead.letter file in your directory, take a look at it with "more" And if it's just junk, rm it. That way when a real emergency comes up and you lose a letter you were writing, you'll know where to find it. In the same way, if you were composing an article for Pnews, whether with Pnews directly or through the feedback option in rn, the program will save all the contents of your article in a file called dead.article or .article if you're interrupted. Again, you should rm these if you don't need them. Also, if you're reading mail and are cut off, the letter you were reading might be deleted from your mail spool and saved in a mbox. If you see an mbox in your directory and you don't know why, take a look at it . . . it might be a long lost letter. Also, if you tend to save letters, make note that the hard drive can get filled in two different ways. One, just with size and one with number of files. That is, if the disk has 100 megabytes of space, and you write a 100 megabyte file, you will fill it. But also, there are a certain number of inodes per disk volume. Even if you don't have 100 megabytes of material, you can logically fill the disk (as opposed to physically) by using up all the inodes. You can type "df" {man df} to see how full the disks are. If it's filling up in terms of physical space, one thing you can do to help is to compress your files. Type "compress <filename>" {man compress} and it will use a compression algorithm to make your file smaller . . . you will not lose any data, it's a very old, well proven algorithm. The disadvantage of compression is that it is not "on the fly" so if you want to read it, you must first "uncompress <filename>" {man uncompress}. You can recognize compressed file in that the program appends the suffix ".Z" to the filename. If there's a problem with inodes, you can catenate like files with "cat" (see above) if they are text files, or you can "tar cf <filename>.tar <filename>" to put all the contents of a directory called "stuff" in a single file called "stuff.tar" Again, like compress, you cannot use these files. You must first untar them with "tar xf <filename>.tar" before you can use them. You can view them, however with "zcat <filename> | less" (that vertical line is called a pipe). And while you're at it you may as well compress the tar'ed file. Finally, there are files call "core" while sometimes appear in your directory. This happens when a program you were using decides to die. The operating system gives you a chance to save your work or at least find out what happened by dumping the content of the RAM you were using into a file called "core" Now unless what you were doing was incredibly important and virtually unrepeatable, you probably want to rm the core files in your directory . . . particularly considering that they tend to be quite large. Man Pages This is something that everyone should get comfortable using. It's the instruction pages. Unfortunately, they were written by programmers rather than comp. lit'ers, so it's a bit archaic, but once you figure out the general format, they're more or less all the same. As an example, I'm doing a "man man": that is, I getting the instructions on how to use the command "man" MAN(1) UNIX Programmer's Manual MAN(1) NAME man - find manual information by keywords; print out the manual SYNOPSIS man [ - ] [ -M path ] [ section ] title ... man -t title ... man -k keyword ... man -f file ... Ok, this is the first part. The synopis is very important. This tells you how to use this thing. The "-" is called a flag. The "-t" is "t flag." Basically, what flags do is modify the command. The synopsis tries to give you an idea of what it's about, but really, you have to read the descriptions. In the description part, it will describe each one of these options. DESCRIPTION Man is a program which gives information from the program- mers manual. It can be asked for one line descriptions of commands specified by name, or for all commands whose description contains any of a set of keywords. It can also provide on-line access to the sections of the printed manual. When given the option -t and the title of a manual page, man prints the specified man page on the default printer. The default troff command used with the -t option is ptroff, which formats the output for printing on a PostScript printer. A different formatter can be specified with the `TROFF' environment variable. When given the option -k and a set of keywords, man prints out a one line synopsis of each manual sections whose list- ing in the table of contents contains one of those keywords. When given the option -f and a list of file names, man attempts to locate manual sections related to those files, printing out the table of contents lines for those sections. If none of these options is specified, man formats a speci- fied set of manual pages. If a section specifier is given, man looks in that section of the manual for the given titles. Section is either an Arabic section number (3 for instance), or one of the words ``new,'' ``local,'' ``old,'' or ``public.'' A section number may be followed by a single letter classifier (for instance, 1g, indicating a graphics program in section 1). If section is omitted, man searches all sections of the manual, giving preference to commands over subroutines in system libraries, and printing the first section it finds, if any. Pretty scary, eh? But you see the format? The first paragraph gives you a description of the command and basically the kind of think it can do. Then each paragraph tells you about an option. The first option is the "-t" which means that if you wanted to print out the man description for a command, say "cd" (change directory) you would type "man -t cd" and if you have a printer hooked to the machine, it would spit out the man pages on this . . . (basically, don't do this, it will just print in room 836 or whatever in Williams Hall, not your computer at home). The next option is "-k" You use this if you have an idea what you want to do, but no idea what the command might be called. For instance, I forgot the command to use to count the number of lines in a text file. So I typed "man -k count" and I got a list of commands with one-line descriptions. I looked like "wc" was the one I wanted, so then I did "man wc" and there it was. The other option is "-f" which will just list the man files which have anything to do with the command you want to look up . . . I did a "man -f tty" and got two different files: tty (1) and tty (4). These numbers are section headings. When I did a "man tty" it only gave me the first file. If I want to see the other file, I would have to type "man 4 tty" Finally you will see something like this at the end: FILES /usr/man standard manual area /usr/man/man?/* directories containing source for manuals /usr/man/cat?/* directories containing preformatted pages /usr/man/whatis keyword database SEE ALSO apropos(1), more(1), whereis(1), catman(8) BUGS The manual is supposed to be reproducible either on the pho- totypesetter or on a typewriter. However, on a typewriter some information is necessarily lost. And that's it . . . the SEE ALSO is just that . . . you can man these commands to see if they'll do something similar to what you want. Last thing Basically,you should be using vt100. Make sure the terminal program you are using at home is emulating vt100 (vt102 is basically the same) and then as soon as you login, the computer will ask you to type in your terminal emulation type . . . it should read "TERM= (vt100)" If it does, then all you have to do is hit [return] since you want vt100, the default. If there's something else in the parentheses, then you have to type in "vt100"[return] Why am I forcing you to use vt100? Basically 'cause I fought with tset for a while and could get it to do what I wanted . . . so rather than really finding out how to use it, I'm just asking you to do it this way so everyone will be doing the same thing and something that basically works. If you want to figure it out yourself and prove what a bozo I am, type "man tset" and add the appropriate lines to your .profile file. // I think elm, emacs, pico, archie, calendar, calculator, and // shell basics are worth mentioning too. Also cp, grep, find, // maybe awk, kermit (!), uucp, echo, env, file, kill, a bit // about environmental variables, news, passwd (and the importance // of some security), pwd, >, <, tee. // How about it ? (no kidding, seriously). // I'm looking forward to hear from you soon. // Mike.