![[Photo of the Author]](../../common/images/Guido-S.gif) 
 
    original in en Guido Socher
en to de Guido Socher
Guido mag Linux, weil es sehr flexibel ist und viel mehr bietet, als jedes andere Betriebssystem.
 
 
    Traditonalle Linux Kommandozeilenprogramme waren schon immer
in man-Seiten dokumentiert. Ein einfaches
 man name_des_Befehls
erklärt, wie der Befehl zu benutzen ist.
Die Vorteile von man-Seiten gegenüber anderer Dokumentation sind:
> whichman -0 printf /usr/share/man/man1/printf.1.bz2 /usr/share/man/man3/printf.3.bz2Die verschiedenen Sections sind:
Section 
   1    User commands (Befehle für den Benutzer)
   2    System calls, that is, functions provided 
        by the kernel. (Systembefehle, Funktionen die
        durch den Kernel zur Verfügung gestellt werden)
   3    Subroutines, that is, library functions.
        (Subroutinen, Libraryfunktionen)
   4    Devices, that is, special files in the /dev directory.
        (Devices in speziellen Dateien unter /dev)
   5    File format descriptions, e.g. /etc/passwd.
        (Beschreibung von Dateiformaten, z.B /etc/passwd)
   6    Games, self-explanatory.
        (Spiele)
   7    Miscellaneous, e.g. Makro packages, conventions.
        (Verschiedenes)
   8    System administration tools that only root can execute.
        (Systemadministration, Befehle, die nur root benutzen kann)
   9    Other  (anderes)
   n    New documentation, that may be moved to a more 
        appropriate section.
        (neue Dokumentation, sie wird später ggf. in andere Sections
        verschoben)
   l    Local documentation referring to this particular system.
        (lokale, für dieses System spezifische Dokumentation)
    Wenn man also "man 1 printf" tippt, bekommt man die Dokumentation
für den Shellbefehl printf und mit "man 3 printf" bekommt man die
Beschreibung der C-Library-Funktion. Tippt man nur "man printf", so
erhält man die Seite, die zuerst gefunden wird (normalerweise
printf aus section 1).
    Um zu prüfen, ob es mehrere Seite gibt, kann man entweder den
whichman Befehl bnutzen (herunterladbar von 
    meiner Homepage), oder
man tippt einfach "man:printf" in konqueror und konqueror wird
eine Auswahl anzeigen:
 
Bash: MANPATH="/usr/local/man:/usr/man:/usr/share/man:/usr/X11R6/man:/usr/lib/perl5/man" export MANPATH Tcsh: setenv MANPATH "/usr/local/man:/usr/man:/usr/share/man:/usr/X11R6/man:/usr/lib/perl5/man"Nachdem der MANPATH gesetzt ist, kann man "man Pod::Man" probieren, um zu sehen, ob man die man-Seiten von Perl bekommt.
.TH -> Druckt Titel und Kopfzeile der man-Seite .SH -> Überschrift des Abschnittes .PP -> Neuer Paragraph ." -> Eine Kommentarzeile .TP -> Einrücken des Textes, der zwei Zeilen nach diesem Makro erscheint
.nf _vorformatierter _Text_hier .fiBeachte, dass dies groff/nroff Makros sind, die als solches nicht zu den speziellen man-Seiten Makros gehören. Sie scheinen aber problemlos auf allen Unixsystemen zu funktionieren.
Alle Schlüsselwörter für man-Seiten sind in der groff_man(7) man-Seite dokumentiert (Hier klicken, um die HTML-version der groff_man(7) man-Seite zu lesen). Ich werde diese Makros hier nicht weiter erklären, da die groff_man(7) Seite schon sehr gut ist und alles enthält, was man wissen muß.
NAME           Name section, the name of the function or command.
SYNOPSIS       Usage.
DESCRIPTION    General description
OPTIONS        Should include options and parameters.
RETURN VALUES  Sections two and three function calls.
ENVIRONMENT    Describe environment variables.
FILES          Files associated with the subject.
EXAMPLES       Examples and suggestions.
DIAGNOSTICS    Normally used for section 4 device interface 
               diagnostics.
ERRORS         Sections two and three error and signal handling.
SEE ALSO       Cross references and citations.
STANDARDS      Conformance to standards if applicable.
BUGS           Gotchas and caveats.
SECURITY CONSIDERATIONS
               Security issues to be aware of.
other          Customized headers may be added at the authors 
               discretion.
    .TH cdspeed 1 "September 10, 2003" "version 0.3" "USER COMMANDS" .SH NAME cdspeed \- decrease the speed of you cdrom to get faster access time .SH SYNOPSIS .B cdspeed [\-h] [\-d device] \-s speed .SH DESCRIPTION Modern cdrom drives are too fast. It can take several seconds on a 60x speed cdrom drive to spin it up and read data from the drive. The result is that these drives are just a lot slower than a 8x or 24x drive. This is especially true if you are only occasionally (e.g every 5 seconds) reading a small file. This utility limits the speed and makes the drive more responsive when accessing small files. .PP cdspeed makes the drive also less noisy and is very useful if you want to listen to music on your computer. .SH OPTIONS .TP \-h display a short help text .TP \-d use the given device instead of /dev/cdrom .TP \-s set the speed. The argument is a integer. Zero means restore maximum speed. .SH EXAMPLES .TP Set the maximum speed to 8 speed cdrom: .B cdspeed \-s 8 .PP .TP Restore maximum speed: .B cdspeed \-s 0 .PP .SH EXIT STATUS cdspeed returns a zero exist status if it succeeds to change to set the maximum speed of the cdrom drive. Non zero is returned in case of failure. .SH AUTHOR Guido Socher (guido (at) linuxfocus.org) .SH SEE ALSO eject(1)Hier klicken, (cdspeed.html) um obige Seite als html formatierte man-Seite zu sehen.
nroff -man your_manpagefile.1 | lessoder
groff -man -Tascii your_manpagefile.1 | lessUm die man-Seite in reinen Text (keine Farben oder Fettdruck) zu konvertieren, benutzt man:
nroff -man your_manpagefile.1 | col -b > xxxx.txtUm die man-Seite in Postscript (zum Drucken oder Weiterverarbeiten in PDF) format zu erhalten:
groff -man -Tps your_manpagefile.1 > your_manpagefile.psUm die man-Seite in HTML umzuwandeln:
man2html your_manpagefile.1
pod2man your_manpagefile.pod > your_manpagefile.1Die Syntax der POD Dokumentationssprache ist in der man-Seite namens perlpod dokumentiert. Das obige Beispiel würde im POD-format wie folgt aussehen. Beachte, dass Leerzeichen und Leerzeilen eine Rolle in der POD Dokumentationssprache spielen. Es ist wichtig, um die Zeilen mit "=head" Leerzeilen zu lassen.
=head1 NAME
cdspeed -  decrease  the speed of you cdrom to get faster access time
=head1 SYNOPSIS
cdspeed [-h] [-d device] -s speed
=head1 DESCRIPTION
Modern cdrom drives are too fast. It can take several seconds  on a  60x
speed cdrom drive to spin it up and read data from the drive.  The result
is that these drives  are just  a lot slower than a 8x or 24x drive.
This is especially true if you are only occasionally (e.g every 5 seconds)
reading a small file. This utility limits the speed and makes the  drive
more  responsive  when  accessing  small files.
cdspeed makes the drive also less noisy and is very useful
if you want to listen to music on your computer.
=head1 OPTIONS
B<-h> display a short help text
B<-d> use the given device instead of /dev/cdrom
B<-s> set the speed. The  argument  is a  integer.  Zero
means restore maximum speed.
=head1 EXAMPLES
Set the maximum speed to 8 speed cdrom:
          cdspeed -s 8
Restore maximum speed:
          cdspeed -s 0
=head1 EXIT STATUS
cdspeed returns  a  zero  exist  status  if it succeeds to
change to set the maximum speed of the  cdrom  drive.  Non
zero is returned in case of failure.
=head1 AUTHOR
Guido Socher
=head1 SEE ALSO
eject(1)