Another useful interpretation of the M in RTFM is the word Message, since often the answer to a question is inherent in the error message which inspired it. Take this one for example:
/: write failed, file system is full
So, Read The Fine Message.
If the message isn't the problem, then look to the Manual. The command "man <subject>" will display the UNIX manual page for the given subject if one exists. Unfortunately the man command isn't very smart, and can't figure out that if you said "man dir" you're a DOS weenie and you really want to know about ls(1) (instead you'll get the page from section 5 of the manual which describes the file format of UNIX directories which may be interesting, but isn't exactly what you had in mind).
The -k argument (k for keyword) to man will show you a list of the man pages which have a string in their description, so
% man -k dir
That number in parentheses indicates in which section of the manual the entry for ls is to be found. The standard sections for the UNIX man pages are as follows:
|1||- user commands|
|2||- system calls|
|3||- user-level library functions|
|4||- device drivers, protocols, and network interfaces|
|5||- file formats used or read by various programs|
|6||- games and demos|
|7||- miscellaneous useful information pages|
|8||- system maintenance and operation commands|
|l||- local commands and stuff|
|n||- new commands|
|o||- old commands|
|p||- public commands and stuff|
To ask for the man page for ls from section 2 of the manual, you just put the 2 before the topic like: "man 2 ls" That page would tell you about the ls UNIX system call.
Often when you finally get to the man page which should answer your question, the page is written in such a terse coder fashion that the answer still isn't clear.
This is where mindset comes in. I tell people that they should read UNIX man pages as they would read a mystery or science fiction novel. This is a two-part mindset:
I did this for the first few years I was working in UNIX, and it was invaluable in helping me to know whether there was a tool out there to help me do something, and if there was, to give me a clue about how to find it. I haven't done it in a while so I'm probably about due.
I've written a script to allow you to browse through all the man pages in a section. It's called "browseman" and lives in /tools/public/bin. It browses section 1 by default. It displays each man page in the section using your default pager (probably more(1), maybe less(1)).
Once you've started browseman, you can skip the rest of the current page and go on to the next page by hitting "q". To quit completely, type ctrl-C (followed by q if your pager is less(1))
Up to the TTTT index
Tuesday Tiny Techie Tips are all © Copyright 1996-1997 by Jeff Youngstrom. Please ask permission before reproducing any of this material.