author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 27 Nov 2011 23:28:27 +0200 | |
changeset 1099 | 97e0815972e0 |
parent 899 | 7b4265c8d324 |
permissions | -rw-r--r-- |
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 | 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 | 30 |
* Sections order. |
31 |
||
32 |
NAME - brief prog description |
|
33 |
SYNOPSIS (USAGE) - command line options in BNF |
|
34 |
DESCRIPTION - long prog description |
|
35 |
OPTIONS - long option descriptions |
|
36 |
... misc sections ... |
|
37 |
EXAMPLES |
|
38 |
EXIT STATUS |
|
39 |
ENVIRONMENT |
|
40 |
AVAILABILITY - whare search source, where home page |
|
41 |
FILES - list of files that has effect on program working |
|
42 |
AUTHORS |
|
43 |
COPYRIGHT |
|
44 |
SEE ALSO |
|
45 |
BUGS - know issue, how report bug |
|
46 |
HISTORY |
|
47 |
||
293 | 48 |
* Man page showing. |
49 |
||
50 |
TODO |
|
51 |
Bolt by print char, back one char and print same char. |
|
52 |
Underscore by printing undescore, back one char and print char. |
|
366 | 53 |
|
54 |
* Development tools. |
|
55 |
||
56 |
To preview local man page: |
|
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 | 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 | 65 |
|
66 |
$ mkdir man1 |
|
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 | 70 |
|
71 |
* Output format. |
|
72 |
||
73 |
** .txt. |
|
74 |
||
75 |
$ man foo | col -b >.foo.txt |
|
76 |
||
77 |
** .ps. |
|
78 |
||
79 |
$ groff -Tps foo >foo.ps |
|
80 |
||
81 |
** .ps. |
|
82 |
||
83 |
$ groff -Tps foo >foo.ps |
|
84 |
||
85 |
** .dvi. |
|
86 |
||
87 |
$ groff -Tdvi foo >foo.dvi |
|
88 |