4.4. Finding appropriate commands
Sometimes you remember what a command does, but not what it is called.
Names like cpio, nroff, and egrep are not the
easiest in the world to recall. If you find yourself drawing a blank,
try man -k keyword. That idiom, often aliased to
a separate command called apropos, lists all the man pages
whose one-line descriptions match the keyword. For example,
suppose you want to know the system routine that converts a numerical
time to ASCII. Say that man -k ASCII
lists the following:
pbmtoascii (1) - convert a portable bitmap into ASCII graphics
pfbtops (1) - translate a PostScript font in .pfb format to ASCII
strtod (3) - convert ASCII string to double
toascii (3) - convert character to ASCII
UTF-8 (7) - an ASCII compatible multibyte Unicode encoding
ascii (7) - the ASCII character set encoded in octal, decimal, and hexadecimal
asctime, ctime, gmtime, localtime, mktime (3) - transform binary date and time to ASCII
hexdump (1) - ascii, decimal, hexadecimal, octal dump
isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower, isprint,
ispunct, isspace, isupper, isxdigit (3) - character classification routines
pbmtoascii (1) - convert a portable bitmap into ASCII graphics
There it is: The highlighted entry is the one you wanted. Now you
can man asctime (or ctime, or gmtime,
or any of the other covered topics) to read its documentation.