man.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 05 Aug 2015 23:55:34 +0300
changeset 1729 22ffd80639c0
parent 899 7b4265c8d324
permissions -rw-r--r--
Make centered content design with adoption for mobile devices. Highlight TOC.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
899
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
     1
-*- mode: outline; coding: utf-8; -*-
14
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
111
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
     3
* Man sections.
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
     4
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
     5
  1 Executable programs or shell commands.
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
     6
  2 System calls (functions provided by the kernel).
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
     7
  3 Library calls (functions within program libraries).
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
     8
  4 Special files (usually found in /dev).
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
     9
  5 File formats and conventions eg /etc/passwd.
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    10
  6 Games.
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    11
  7 Miscellaneous (including macro  packages  and  conventions).
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    12
  8 System administration commands (usually only for root).
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    13
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    14
* Invoking man.
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    15
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    16
** Search for prog, func, conf file.
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    17
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    18
  $ man [<section>] <item>
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    19
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    20
** Search by specific keywords.
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    21
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    22
  $ man -k <keywords>
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    23
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    24
** Throw Emacs.
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    25
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    26
  M-x man RET [<section>] <item>
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    27
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    28
  M-x man RET -k SPACE <keywords>
3bd7637e1f68 Update doc about man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 14
diff changeset
    29
14
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
* Sections order.
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
NAME                - brief prog description
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
SYNOPSIS (USAGE)    - command line options in BNF
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    34
DESCRIPTION         - long prog description
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
OPTIONS             - long option descriptions
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
... misc sections ...
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37
EXAMPLES
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    38
EXIT STATUS
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    39
ENVIRONMENT
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    40
AVAILABILITY        - whare search source, where home page
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    41
FILES               - list of files that has effect on program working
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    42
AUTHORS
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    43
COPYRIGHT
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    44
SEE ALSO
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    45
BUGS                - know issue, how report bug
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    46
HISTORY
77d9a6b493d8 Added man descr.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    47
293
69ddc7efeb14 Man page showing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 111
diff changeset
    48
* Man page showing.
69ddc7efeb14 Man page showing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 111
diff changeset
    49
69ddc7efeb14 Man page showing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 111
diff changeset
    50
TODO
69ddc7efeb14 Man page showing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 111
diff changeset
    51
Bolt by print char, back one char and print same char.
69ddc7efeb14 Man page showing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 111
diff changeset
    52
Underscore by printing undescore, back one char and print char.
366
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    53
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    54
* Development tools.
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    55
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    56
To preview local man page:
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    57
367
30f042767f78 Added more comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 366
diff changeset
    58
  $ groff -man -Tascii foo.1            # 7-bit char
30f042767f78 Added more comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 366
diff changeset
    59
  $ groff -man -Tlatin1 foo.1           # 8-bit char
30f042767f78 Added more comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 366
diff changeset
    60
  $ groff -man -Tlatin1 foo.1 | less
366
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    61
  $ groff -a -mandoc -Tlatin1 e.1
367
30f042767f78 Added more comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 366
diff changeset
    62
  $ groff -man -Tutf8 foo.1
30f042767f78 Added more comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 366
diff changeset
    63
30f042767f78 Added more comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 366
diff changeset
    64
  $ man ./foo.1                         # if slashes in path - use file
366
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    65
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    66
  $ mkdir man1
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    67
  $ cp foo.1 man1
367
30f042767f78 Added more comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 366
diff changeset
    68
  $ man -M . 1 foo                      # without slashes search in MANPATH item
30f042767f78 Added more comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 366
diff changeset
    69
                                        # and add /man1 to each item
366
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    70
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    71
* Output format.
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    72
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    73
** .txt.
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    74
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    75
  $ man foo | col -b >.foo.txt
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    76
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    77
** .ps.
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    78
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    79
  $ groff -Tps foo >foo.ps
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    80
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    81
** .ps.
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    82
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    83
  $ groff -Tps foo >foo.ps
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    84
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    85
** .dvi.
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    86
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    87
  $ groff -Tdvi foo >foo.dvi
237b5baa819d Development tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 293
diff changeset
    88