# a.out

    ./a.out is the default object file produced by the assembler/loader asld.

# animals
File:   animals - animal game data base

     /usr/lib/animals is the default database for the animals game program.
It is an ASCII file with lines of questions and responses, and lines of
answers. The text strings are enciphered (fairly simply) to reduce cheating.

     A typical Minix /usr/lib/animals is:

 Hqsai  tog t aolgnn ce?k:21
 Iq stig er?y:43
 garifaef
 baaeevr
 eaelhpnat

# core

     ./core is the file produced by the kernel when it aborts, or
"dumps core".  It is a partial image of the Minix system state.

# cronlog
File:   cronlog - cron action log

     /usr/adm/cronlog is an ASCII file in which cron records each occasion
on which it executes a command from /usr/lib/crontab.  There is one entry
per line, and each entry has the format:

     execution_time    crontab_entry

     A typical Minix /usr/lib/cronlog is:

 07/26-13:33     /usr/bin/date >/dev/tty0   # Print date every minute
 07/26-13:34     /usr/bin/date >/dev/tty0   # Print date every minute

# crontab
File:   crontab - cron instruction table

     /usr/lib/crontab is an ASCII file which contains instructions for
cron.  There is one entry per line, and each entry has the format:

        minute hour day_of_month month day_of_week command

     The field descriptions are:

        minute          the minute at which to execute the command
        hour            the hour at which to execute the command
        day_of_month    the day of the month at which to execute the command
	month           the month at which to execute the command
        day_of_week     the day of the week at which to exectute the command
        command         the command to execute

     If a field contains *, then the command will be executed at each
interval.

     A typical Minix /usr/lib/crontab is:

 #  min hr dat mo day   command
     *  *   *  *   *    /usr/bin/date >/dev/tty0   # Print date every minute
     0  *   *  *   *    /usr/bin/date >/dev/tty0   # Print date on the hour
    30  4   *  *  1-5   /bin/backup /dev/fd1       # Backup Mon-Fri at 0430
    30 19   *  *  1,3,5 /etc/backup /dev/fd1       # Mon, Wed, Fri at 1930
     0  9  25 12   *    /usr/bin/sing >/dev/tty0   # Xmas at 0900 only

# dictionary
File:   dictionary - American dictionary used by spell

     /usr/lib/dictionary is an ASCII file of correctly-spelled words, one
word per line.

     A typical Minix /usr/lib/dictionary is:

 a
 a's
 aardvark
 aardvarks
 aback
 abaft

 and so on.

# fortune.dat
File:   fortune.dat - a fortune cookie database used by fortune

     /usr/lib/fortune.dat is a database used by the fortune program, which
is often run at logon.  Fortune.dat is an ASCII file of short remarks,
separated by lines containing only %%.  Fortune picks an entry at random
and displays it.

     A typical Minix /usr/lib/fortune.dat is:

 %%
 A bore is a man who, when you ask him how he is, tells you.
   - B. L. Taylor
 %%
 Oh gracious, why wasn't I born old and ugly?
  - Dickens
 %%

 and so on.

# gettydefs
File:   gettydefs - speed and terminal settings used by getty

     /etc/gettydefs is an ASCII file which contains information used by getty
to set line parameters on login.  Each entry is followed by a blank line,
and has the format:

        label# initial_flags# final_flags# login_prompt #next_label

     The field descriptions are:

        label           string which getty tries to match with its argument.
        initial_flags   ioctl settings until getty executes login.
        final_flags     ioctl settings when getty executes login.
        login_prompt    used as the login prompt.  Note that unlike the
                             other fields, white space is significant.
        next_label      if the user types <Break>, getty will search for this
                             label and use its settings.

     A typical Minix /etc/gettydefs is:

 #
 # MINIX version 1.5 /etc/gettydefs
 #

 1200# SANE B1200# SANE B1200# Login: #2400

 2400# SANE B2400# SANE B2400# Login: #4800

 4800# SANE B4800# SANE B4800# Login: #9600

 9600# SANE B9600# SANE B9600# Login: #300

 300# SANE B300# SANE B300# Login: #1200

 ETHER# SANE B115200# SANE B115200# Ethernet Login: #ETHER

 CONSOLE# SANE B115200# SANE B115200#Console Login: #CONSOLE
 
# group
File:   group - group identity

     /etc/group is an ASCII file which defines the groups to which users
belong.  There is one entry per line, and each line has the format:

        group_name:passwd:GID:user_list

     The field descriptions are:

        group_name     the name of the group.
        password       the (encrypted) group password.  If this field is
                            empty, no password is needed.
        GID            the numerical group ID.
        user_list      all the group member's user names, separated by commas.

     A typical Minix /etc/group is:

 root::0:root
 other::1:
 bin::2:root,bin,daemon
 sys::3:root,bin,sys,adm
 adm::4:root,adm,daemon
 uucp::5:uucp
 mail::7:root
 daemon::12:root,daemon
 cron::16:
 lp::18:lp
 mem::20:
 sysadmin::23:sysadmin
 group::50:

# issue
File:   issue - system identification file

     /etc/issue is an ASCII file which contains a message that is output to
a terminal by getty immediately before it executes login.

     A typical Minix /etc/issue is:

 "This is Minix system 999."

# man
File:   man - manual for commands and system

     /usr/man/man{1,2,3,4,5,6} are ASCII files which contain the Minix
manual.  They are used by the man command, which automatically builds an
index whenever a man file is updated.  The man files entries are multi-line
records separated by index lines, which are lines starting with # and
(containing one word).

     The following man files are available:

        man1, man2, man3, man4, man6

     A typical Minix /usr/man/man1 entry is:

 # banner
 Command:      banner - print a banner
 Syntax:       banner arg ...
 Flags:        (none)
 Examples:     banner happy birthday   # Print a banner saying happy birthday

      Banner prints its arguments on standard output using a matrix of 6 x 6 
 pixels per character.  The @ sign is used for the pixels.

# motd
File:   motd - message of the day

     /etc/motd is an ASCII file which contains a message that is output to
a terminal by login immediately after a successful logon.

     A typical Minix /etc/motd is:

 "The system will be down for repair from 0900-1600 today."

# mtab
File:   mtab - mount table

     /etc/mtab is an ASCII file which contains a list of currently-mounted
devices and their mount points.  It is started in /etc/rc, and maintained by
mount and umount.

     A typical Minix /etc/mtab is:

 /dev/ram is root device
 /dev/hd4 is mounted on /usr
 /dev/hd2 is mounted on /tmp

# nologin

     /etc/nologin is used by login; if this file exists, login will allow
access only to root; other users are given a "System going down" message.

# passwd
File:   passwd - user identity

     /etc/passwd is an ASCII file which contains a list of the system's users
and the passwords (if any) they must use for access.  There is one entry per
line, and each line has the format:

        login_name:passwd:GID:UID:user_name:directory:shell

     The field descriptions are:

        login_name     the name of the user on the system.
        password       the (encrypted) user password.  If this field is
                            empty, no password is needed.
        GID            the numerical group ID for this user.
        UID            the numerical user ID.
        user_name      the (optional) comment field (often a full user name).
        directory      the user's $HOME directory.
        shell          the program to run at logon (if empty, use /bin/sh). 

     A typical Minix /etc/passwd is:

 root:dqWF|GXx4mAq0:0:0::/usr/zzz/root:
 daemon:*:1:1::/etc:
 bin:*:2:2::/bin:
 guest::8:3::/usr/zzz/guest:
 ast:4dn7KO7EG11Ay:8:3::/usr/zzz/ast:

# profile
File:   profile - set up general environment at login

     /etc/profile is a shell script which is run by the shell on login to
set up the general environment for every user, before the individual's
$HOME/.profile is run.  

     A typical Minix /etc/profile is:

 # Set default file creation mask
 umask 022

# psdatabase
File:   psdatabase - ps address database

     /etc/psdatabase is a non-ASCII file which contains the kernel addresses
used by the program ps.  It is the image of a structure used in ps:

 typedef struct {
	struct nlist ke_proc[2], ke_tasktab[2];
	struct nlist mm_mproc[2];
	struct nlist fs_fproc[2];
 } sysinfo_t;

It is generated by the ps -u option.

# rc
File:    rc - run commands at logon

     /etc/rc is a shell script which is run by a shell at startup to set
up the system.  Among other things, it can mount standard file systems,
clear out scratch directories, and initialise devices.

     A typical Minix /etc/rc is:

 # Initialise mtab
 /bin/printroot >/etc/mtab

 # Mount the filesystem(s)
 /bin/echo "Mounting file systems" 
 /etc/mount /dev/hd4 /usr
 /etc/mount /dev/hd2 /tmp

 # Initialise the clock
 /usr/bin/date `/usr/local/bin/rtc`

 # Initialise the first RS232 line to 2400 baud
 /bin/echo "Initialising tty1 to 2400 baud"
 /usr/bin/stty 2400 </dev/tty1

 # General clear-out
 /bin/echo "Clearing spool directories"
 /bin/rm -f /usr/spool/uucp/*
 /bin/rm -f /usr/spool/at/past/*

 # More initialisation 

 >/etc/utmp
 /bin/echo

 # Display sign-on and start update
 /usr/bin/cat /etc/message
 /etc/update  &

# termcap
File:   termcap - terminal capability database

     /etc/termcap is an ASCII file that lists the capabilities of many 
different types of terminal.  Programs can read termcap to find the particular
escape codes needed to control the visual attributes of the terminal actually
in use.  (Other aspects of the terminal are handled by stty.)  The termcap
database is indexed on the TERM environment variable, which is set by login
to the default of 'Minix', and which can be reset by the program tset.
     Termcap entries must be defined on a single logical line, with '\' used
to suppress the newline.  Fields are separated by ':'.  The first field must
start at the left-hand margin, and contain a list of names for the terminal,
separated by '|'. Subsequent fields contain the terminal capabilities; any
continued capability lines must be indented one tab from the left margin.

     A typical Minix /etc/termcap is:

 # Minix Termcap
 #	Modified by Glen Overby <overby@plains.nodak.edu> 3/4/90
 #		Added insert/delete line, character, etc.  Now supports
 #		everything the console impliments that Termcap can use.
 mx|minix|minix console:\
	:bs:\
	:co#80:li#25:\
	:cd=\E[0J:cl=\E[H\E[0J:\
	:so=\E[7m:se=\E[0m:\
	:us=\E[4m:ue=\E[0m:\
	:mb=\E[5m:md=\E[1m:\
	:mr=\E[7m:me=\E[0m:\
	:sr=\EM:\
	:cm=\E[%i%d;%dH:\
	:ho=\E[H:\
	:al=\E[L:AL=\E[%dL:\
	:ce=\E[K:\
	:DC=\E[%dP:dc=\E[P:\
	:DL=\E[%dM:dl=\E[M:\
	:DO=\E[%dB:do=\E[B:\
	:IC=\E[%d@:ic=\E[@:\
	:it#8:\
	:le=^H:LE=\E[%dD:nd=\E[C:\
	:RI=\E[%dC:\
	:up=\E[A:UP=\E[%dA:\
	:ku=\E[A:kd=\E[B:\
	:kl=\E[D:kr=\E[C:\
	:kh=\E[H:k0=\E[Y:\
	:k1=\E[V:k2=\E[U:\
	:k3=\E[T:k4=\E[S:\
	:k5=\E[G:

# ttys
File:   ttys - login requirement database

     /etc/ttys is an ASCII file that is used by login to determine which
terminals need a login process.  There is one entry per line, entries must
be in minor device number order, comments are not allowed, and each line
has the format:

        abc

     The field descriptions are:

        a = 0 gives line disabled = no shell)
            1 gives line enabled = shell started
            2 gives line enabled through a GETTY (/etc/getty must be present)
        b = a-r defines UART paramers (baud, bits, parity), 0 for console
        c = line number or line name. If c is a digit, the terminal will be
            /dev/tty{c}, otherwise it will be /dev/{c}

     A typical Minix /etc/ttys is:

 100
 0d1
 2f2

# ttytype
File:   ttytype -  terminal name and device list

     /etc/ttytype is an ASCII file that lists the names of terminals, as
used in termcap, in association with the names of the ttys to which they
are attatched.  It is used by the program tset to set the environment
variable TERM to the correct terminal name for the user's current tty.

     A typical Minix /etc/ttytype is:

 minix tty0
 am230 tty1
 vt100 tty2

# username
File:   username - file used by mail

     /usr/spool/mail/username is a collection of current messages kept
by the program mail.  A separate file is kept for each user in the directory
/usr/spool/mail.  Each entry in a user's file has the structure:

 struct letter {
   struct letter *prev, *next;	/* linked letter list */
   int status;			/* letter status */
   off_t location;		/* location within mailbox file */
 };

# username.lock
File:   username.lock - lock file used by mail

     /usr/spool/mail/username.lock is an empty file which is created and
removed by the mail program in order to avoid problems with multiple
accesses to mail message files.

# utmp
File:   utmp - user accounting data

     /etc/utmp is a non-ASCII file which stores user accounting information.
If it exists, login and getty will update it.  Each entry has the structure:

 struct utmp {
   char ut_user[8];		/* user name */
   char ut_id[4];		/* /etc/inittab ID */
   char ut_line[12];		/* terminal name */
   pid_t ut_pid;		/* process id */
   short int ut_type;		/* type of entry */
   long ut_time;		/* login/logout time */
 };

# wtmp
File:   wtmp - user and machine accounting data

     /usr/adm/wtmp is a non-ASCII file which stores user and machine
accounting information.  If it exists, login and getty will update it.
The entries have the same structure as /etc/utmp:

 struct utmp {
   char ut_user[8];		/* user name */
   char ut_id[4];		/* /etc/inittab ID */
   char ut_line[12];		/* terminal name */
   pid_t ut_pid;		/* process id */
   short int ut_type;		/* type of entry */
   long ut_time;		/* login/logout time */
 };

# yy.ddd.hhmm.uu
File:   yy.ddd.hhmm.uu - spool files used by atrun

     /usr/spool/at/yy.ddd.hhmm.uu is an ASCII file created by the program
at and used by the program atrun to set up an environment and run a
command.  The filename consists of the year, day, hour and minute that
the command is to be run, together with a random number to avoid confusion
between similar times.

     Atrun is usually run once a minute by cron; each time it is run, it
executes all pending commands and moves the files used to the directory
/usr/spool/at/past.

     A typical Minix yy.ddd.hh.mm file is 90.243.2300.13, which prints the
working directory at 2300 on 1 September:

 MODEM='/dev/tty1'; export MODEM
 PATH=':/bin:/usr/local/bin:/usr/bin'; export PATH
 TERM='minix'; export TERM
 SHELL='/bin/sh'; export SHELL
 HOME='/usr/zzz/cwr'; export HOME
 LOGNAME='cwr'; export LOGNAME
 USER='cwr'; export USER
 cd /usr/spool
 umask 22
 /usr/bin/pwd
