Information

cal

cal gibt einen einfachen Kalender aus. Monat und Jahr können als Parameter übergeben werden.
 

ptschorn@Bedlam:~ > cal 1999
                               1999

       January               February                 March
Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa
                1  2       1  2  3  4  5  6       1  2  3  4  5  6
 3  4  5  6  7  8  9    7  8  9 10 11 12 13    7  8  9 10 11 12 13
10 11 12 13 14 15 16   14 15 16 17 18 19 20   14 15 16 17 18 19 20
17 18 19 20 21 22 23   21 22 23 24 25 26 27   21 22 23 24 25 26 27
24 25 26 27 28 29 30   28                     28 29 30 31
31
        April                   May                   June
Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa
             1  2  3                      1          1  2  3  4  5
 4  5  6  7  8  9 10    2  3  4  5  6  7  8    6  7  8  9 10 11 12
11 12 13 14 15 16 17    9 10 11 12 13 14 15   13 14 15 16 17 18 19
18 19 20 21 22 23 24   16 17 18 19 20 21 22   20 21 22 23 24 25 26
25 26 27 28 29 30      23 24 25 26 27 28 29   27 28 29 30
                       30 31
        July                  August                September
Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa
             1  2  3    1  2  3  4  5  6  7             1  2  3  4
 4  5  6  7  8  9 10    8  9 10 11 12 13 14    5  6  7  8  9 10 11
11 12 13 14 15 16 17   15 16 17 18 19 20 21   12 13 14 15 16 17 18
18 19 20 21 22 23 24   22 23 24 25 26 27 28   19 20 21 22 23 24 25
25 26 27 28 29 30 31   29 30 31               26 27 28 29 30

       October               November               December
Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa
                1  2       1  2  3  4  5  6             1  2  3  4
 3  4  5  6  7  8  9    7  8  9 10 11 12 13    5  6  7  8  9 10 11
10 11 12 13 14 15 16   14 15 16 17 18 19 20   12 13 14 15 16 17 18
17 18 19 20 21 22 23   21 22 23 24 25 26 27   19 20 21 22 23 24 25
24 25 26 27 28 29 30   28 29 30               26 27 28 29 30 31
 
 

ptschorn@Bedlam:~ > cal 5 1999
      May 1999
Su Mo Tu We Th Fr Sa
                   1
 2  3  4  5  6  7  8
 9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

date

Mit date erfährt man das aktuelle Datum und die aktuelle Uhrzeit des Systems.
Unzählige Variationen der Ausgabe sind möglich:

ptschorn@Bedlam:~ > date
Sat May  1 16:28:16 MEST 1999

ptschorn@Bedlam:~ > date "+%w / %y"
6 / 99

ptschorn@Bedlam:~ > date "+%A %B %Y"
Saturday May 1999

ptschorn@Bedlam:~ > date "+%D"
05/01/99

df

df gibt über den verfügbaren Speicherplatz in den gemounteten Dateisystemen Auskunft. Interessiert man sich nur für bestimmte Dateisysteme, gibt man diese als Parameter an. Alle Angaben erfolgen in Blöcken zu 1K.

ptschorn@Bedlam:~ > df
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/hdc3            1973504  880367   991125     47%   /
/dev/hda1             614672  283696   330976     46%   /new0rder
/dev/hdc1            3583472 2850768   732704     80%   /sp33dkills

du

Mit du läßt sich die Größe von beliebigen Dateien und Verzeichnissen feststellen.  Gemessen wird in 1K Blöcken.

ptschorn@Bedlam:~ > du shell/*
1       shell/anordnen.html
1       shell/betrachten.html
4       shell/identifizieren.html
8       shell/information.html
1       shell/kataloge.hmtl
1       shell/kompaktieren
1       shell/prozesse.html
1       shell/service.html

ptschorn@Bedlam:~ > du shell -s
18      shell

Diverse Optionen erlauben es u.A. z.B. Summen (etwa für Verzeichnisse) zu bilden oder in Kilobytes zu messen.

id

id informiert über einen bestimmten Benutzer, indem es die Benutzer- und GruppenIDs ausgibt. Mit verschiedenen Schaltern kann die Ausgabe (etwa nur auf die GruppenID) beschränkt werden.

ptschorn@Bedlam:~ > id root
uid=0(root) gid=0(root) groups=0(root),1(bin),14(uucp),15(shadow),16(dialout),65534(nogroup)

ptschorn@Bedlam:~ > id
uid=500(ptschorn) gid=100(users) groups=100(users)

logname

logname liefert den Namen des aufrufenden Benutzers:

ptschorn@Bedlam:~ > logname
ptschorn

man

man gestattet den Zugriff auf die Online-Dokumentation. Als Argument gibt man einfach den Befehl ein, der einen interessiert. Das Aussehen der Manual-Seiten ist standardisiert.  Es gibt verschiedene Sektionen: 1:Shellkommandos, 2:Systemaufrufe, 3:Funktionen aus Bibliotheken, ...
Ein Befehl kann in mehreren Sektionen auftauchen, interessiert man sich z.B. nur für Systemaufrufe, würde man man 2 Begriff tippen.

ptschorn@Bedlam:~ > man man
man(1)                  Manual pager utils                 man(1)
 

NAME
       man - an interface to the on-line reference manuals

SYNOPSIS
       man  [-c|-w|-tZT  device]  [-adhu7V] [-m system[,...]] [-L
       locale] [-p string] [-M path] [-P pager] [-r  prompt]  [-S
       list] [-e extension] [[section] page ...] ...
       man  -l  [-7]  [-tZT  device]  [-p  string] [-P pager] [-r
       prompt] file ...
       man -k [-M path] keyword ...
       man -f [-M path] page ...

DESCRIPTION
       man is the system's manual pager. Each page argument given
       to man is normally the name of a program, utility or func­
       tion.  The manual page associated with each of these argu­
       ments is then found and displayed. A section, if provided,
       will direct man to look only in that section of  the  man­
       ual.  The default action is to search in all of the avail­
       able sections, following a pre-defined order and  to  show
       only  the first page found, even if page exists in several
       sections.

       The table below shows the section numbers  of  the  manual
       followed by the types of pages they contain.

       1   Executable programs or shell commands
       2   System calls (functions provided by the kernel)
       3   Library calls (functions within system libraries)
       4   Special files (usually found in /dev)
       5   File formats and conventions eg /etc/passwd
       6   Games
       7   Macro packages and conventions eg man(7), groff(7).
       8   System administration commands (usually only for root)
       9   Kernel routines [Non standard]
       n   new [obsolete]
       l   local [obsolete]
       p   public [obsolete]
       o   old [obsolete]

       A manual page consists of several parts.

(...)

tty

tty gibt den Dateinamen des Terminals aus, das mit der Standardeingabe verbunden ist.

ptschorn@Bedlam:~ > tty
/dev/ttyp1

Kennt man diese Information, kann man die Ausgabe eines Terminals auf ein anders umlenken.