(?) read the manual!

From Benjamin A. Okopnik, John Karns, Ashwin N

(!) [Heather] A merry little thread wherein we got almost no data to work with, got us giving such incredibly generic answers that this is the good part.

(?) If i know the syntax of the command then i will be able to use it in my c program through popen or system call.

{{{ All of this information is available via the "man" program. The Unix/Linux information infrastructure is tremendously powerful (although admittedly rather non-intuitive for a new user.) I suggest that you make it your friend.

For more information on using it, see "man", "apropos", "whatis", "whereis", and (if your tastes run to torturing small defenseless animals and pushing old ladies under passing automobiles) "info". {{{{

(!) [John] As a person who generally avoids emacs ( xemacs is a step in right direction, but hey, I'm already familiar with vim ) I've found the lynx-like utility "pinfo" to be a painless way to view info files.
{{{ Also, make sure to check out the documentation that literally every installed program places in "/usr/doc/<program_name>" or "/usr/share/<program_name>" on your system; this is an additional treasure trove of information. {{{{
(!) [Ashwin] For users of KDE/GNOME here are a couple of painless (and also colorful) ways of viewing their manuals or info.


KDE

KDE users can use konqueror for viewing their docs. Just type

man:/fortune
in the addressbar to view the manpage of "fortune".
Incase you need to access a particular section of a manpage,

man:/ip(7)
should do it.
To view info,

info:/gcc


GNOME

For GNOME users there is gnome-help-browser. Just type

man:fortune
or

man:ip(7)
in it's addressbar to get your manpages.
And to view info files,

info:gcc
The advantage with viewing man pages like this is that you can switch to a particular manpage you see listed there by just clicking on it.
Similarly, info painlessly transforms into just simple HTML-like browseable docs.
(!) [Ben] The Linux documentation subsystem is large, accessible and very helpful... if you know what you're doing. If you don't, Linux looks like a difficult puzzle - "a maze of twisty passages, all alike". If you're looking for information on a program, here is a quick way to the treasure hoard:

# I need to know about everything that deals with TIFF files.
ben@Fenrir:~$ apropos TIFF

# Whoa, man! That was too much stuff! I just want _programs!_
ben@Fenrir:~$ apropos TIFF | grep '(1'

# OK, I know which one I want ("ras2tiff"); how do I tell where it is?
ben@Fenrir:~$ whereis ras2tiff

# I know the name of a program ("foo"), but not what it does. What now?
ben@Fenrir:~$ whatis foo

# Naw, I want a _complete_ explanation, syntax, descriptions, etc.
ben@Fenrir:~$ man foo

# But I *HATE* man pages! I want more structure, indexes, etc...
ben@Fenrir:~$ info foo

# Command-line stuff, YUCK. Can I have a pretty GUI?
ben@Fenrir:~$ tkman foo

# I meant for "info"!
ben@Fenrir:~$ tkinfo foo

# "man" tells me that the program ("blarg") is undocumented. Help!
ben@Fenrir:~$ blarg -?
ben@Fenrir:~$ blarg -h
ben@Fenrir:~$ blarg --help
ben@Fenrir:~$ ls /usr/doc/blarg*
ben@Fenrir:~$ ls /usr/share/doc/blarg*
ben@Fenrir:~$ ls /usr/lib/blarg*

# What I *really* want is a Wind*ws help file, with pretty pictures and
# instructions for pressing the "any" key! And I want it to say "Your
# mouse is unplugged - click 'OK' to continue". And, and, I want a big
# juicy burger with onions and lots of cheese and just a little
# ketchup...
ben@Fenrir:~$ export YOU_ARE_REALLY_GETTING_ON_MY_NERVES=1
ben@Fenrir:~$ su -c 'slay -9 annoying_user'
Password:
Note: several of the programs mentioned above are not installed by default on most distros. Download, install, and be joyful.




Copyright © 2002
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 84 of Linux Gazette, November 2002


[ Table Of Contents ][ Answer Guy Current Index ] greetings   Meet the Gang   1   2   3   4 [ Index of Past Answers ]