summaryrefslogtreecommitdiffstats
path: root/share/man/man5
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1994-05-30 19:09:18 +0000
committerrgrimes <rgrimes@FreeBSD.org>1994-05-30 19:09:18 +0000
commitb0d61785cae024b1f44119446a940ee14c9ac959 (patch)
tree5a495a583b002ae9e57f09848ae697160708c220 /share/man/man5
parentd43599f73ba5858e573c7ad8b284f6a0808c5c93 (diff)
downloadFreeBSD-src-b0d61785cae024b1f44119446a940ee14c9ac959.zip
FreeBSD-src-b0d61785cae024b1f44119446a940ee14c9ac959.tar.gz
BSD 4.4 Lite Share Sources
Diffstat (limited to 'share/man/man5')
-rw-r--r--share/man/man5/Makefile18
-rw-r--r--share/man/man5/a.out.5396
-rw-r--r--share/man/man5/acct.5110
-rw-r--r--share/man/man5/core.5111
-rw-r--r--share/man/man5/dir.5151
-rw-r--r--share/man/man5/disktab.5142
-rw-r--r--share/man/man5/fs.5342
-rw-r--r--share/man/man5/fstab.5226
-rw-r--r--share/man/man5/group.5123
-rw-r--r--share/man/man5/hosts.5109
-rw-r--r--share/man/man5/networks.588
-rw-r--r--share/man/man5/passwd.5186
-rw-r--r--share/man/man5/phones.576
-rw-r--r--share/man/man5/printcap.5288
-rw-r--r--share/man/man5/protocols.577
-rw-r--r--share/man/man5/remote.5200
-rw-r--r--share/man/man5/resolver.5142
-rw-r--r--share/man/man5/services.585
-rw-r--r--share/man/man5/shells.565
-rw-r--r--share/man/man5/stab.5222
-rw-r--r--share/man/man5/types.5147
-rw-r--r--share/man/man5/utmp.5218
22 files changed, 3522 insertions, 0 deletions
diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile
new file mode 100644
index 0000000..78bf304
--- /dev/null
+++ b/share/man/man5/Makefile
@@ -0,0 +1,18 @@
+# @(#)Makefile 8.1 (Berkeley) 6/5/93
+
+MAN5= a.out.0 acct.0 core.0 dir.0 disktab.0 dump.0 fs.0 fstab.0 \
+ group.0 hosts.0 networks.0 passwd.0 phones.0 plot.0 printcap.0 \
+ protocols.0 remote.0 resolver.0 services.0 shells.0 stab.0 types.0 \
+ utmp.0
+MLINKS= fs.5 inode.5 dump.5 dumpdates.5 utmp.5 wtmp.5
+
+all: ${MAN5}
+
+clean depend lint tags:
+
+cleandir:
+ rm -f ${MAN5}
+
+install: maninstall
+
+.include <bsd.prog.mk>
diff --git a/share/man/man5/a.out.5 b/share/man/man5/a.out.5
new file mode 100644
index 0000000..9ad2876
--- /dev/null
+++ b/share/man/man5/a.out.5
@@ -0,0 +1,396 @@
+.\" Copyright (c) 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This man page is derived from documentation contributed to Berkeley by
+.\" Donn Seeley at UUNET Technologies, Inc.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)a.out.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt A.OUT 5
+.Os
+.Sh NAME
+.Nm a.out
+.Nd format of executable binary files
+.Sh SYNOPSIS
+.Fd #include <a.out.h>
+.Sh DESCRIPTION
+The include file
+.Aq Pa a.out.h
+declares three structures and several macros.
+The structures describe the format of
+executable machine code files
+.Pq Sq binaries
+on the system.
+.Pp
+A binary file consists of up to 7 sections.
+In order, these sections are:
+.Bl -tag -width "text relocations"
+.It exec header
+Contains parameters used by the kernel
+to load a binary file into memory and execute it,
+and by the link editor
+.Xr ld 1
+to combine a binary file with other binary files.
+This section is the only mandatory one.
+.It text segment
+Contains machine code and related data
+that are loaded into memory when a program executes.
+May be loaded read-only.
+.It data segment
+Contains initialized data; always loaded into writable memory.
+.It text relocations
+Contains records used by the link editor
+to update pointers in the text segment when combining binary files.
+.It data relocations
+Like the text relocation section, but for data segment pointers.
+.It symbol table
+Contains records used by the link editor
+to cross reference the addresses of named variables and functions
+.Pq Sq symbols
+between binary files.
+.It string table
+Contains the character strings corresponding to the symbol names.
+.El
+.Pp
+Every binary file begins with an
+.Fa exec
+structure:
+.Bd -literal -offset indent
+struct exec {
+ unsigned short a_mid;
+ unsigned short a_magic;
+ unsigned long a_text;
+ unsigned long a_data;
+ unsigned long a_bss;
+ unsigned long a_syms;
+ unsigned long a_entry;
+ unsigned long a_trsize;
+ unsigned long a_drsize;
+};
+.Ed
+.Pp
+The fields have the following functions:
+.Bl -tag -width a_trsize
+.It Fa a_mid
+Contains a bit pattern that
+identifies binaries that were built for
+certain sub-classes of an architecture
+.Pq Sq machine IDs
+or variants of the operating system on a given architecture.
+The kernel may not support all machine IDs
+on a given architecture.
+The
+.Fa a_mid
+field is not present on some architectures;
+in this case, the
+.Fa a_magic
+field has type
+.Em unsigned long .
+.It Fa a_magic
+Contains a bit pattern
+.Pq Sq magic number
+that uniquely identifies binary files
+and distinguishes different loading conventions.
+The field must contain one of the following values:
+.Bl -tag -width ZMAGIC
+.It Dv OMAGIC
+The text and data segments immediately follow the header
+and are contiguous.
+The kernel loads both text and data segments into writable memory.
+.It Dv NMAGIC
+As with
+.Dv OMAGIC ,
+text and data segments immediately follow the header and are contiguous.
+However, the kernel loads the text into read-only memory
+and loads the data into writable memory at the next
+page boundary after the text.
+.It Dv ZMAGIC
+The kernel loads individual pages on demand from the binary.
+The header, text segment and data segment are all
+padded by the link editor to a multiple of the page size.
+Pages that the kernel loads from the text segment are read-only,
+while pages from the data segment are writable.
+.El
+.It Fa a_text
+Contains the size of the text segment in bytes.
+.It Fa a_data
+Contains the size of the data segment in bytes.
+.It Fa a_bss
+Contains the number of bytes in the
+.Sq bss segment
+and is used by the kernel to set the initial break
+.Pq Xr brk 2
+after the data segment.
+The kernel loads the program so that this amount of writable memory
+appears to follow the data segment and initially reads as zeroes.
+.It Fa a_syms
+Contains the size in bytes of the symbol table section.
+.It Fa a_entry
+Contains the address in memory of the entry point
+of the program after the kernel has loaded it;
+the kernel starts the execution of the program
+from the machine instruction at this address.
+.It Fa a_trsize
+Contains the size in bytes of the text relocation table.
+.It Fa a_drsize
+Contains the size in bytes of the data relocation table.
+.El
+.Pp
+The
+.Pa a.out.h
+include file defines several macros which use an
+.Fa exec
+structure to test consistency or to locate section offsets in the binary file.
+.Bl -tag -width N_BADMAG(exec)
+.It Fn N_BADMAG exec
+Nonzero if the
+.Fa a_magic
+field does not contain a recognized value.
+.It Fn N_TXTOFF exec
+The byte offset in the binary file of the beginning of the text segment.
+.It Fn N_SYMOFF exec
+The byte offset of the beginning of the symbol table.
+.It Fn N_STROFF exec
+The byte offset of the beginning of the string table.
+.El
+.Pp
+Relocation records have a standard format which
+is described by the
+.Fa relocation_info
+structure:
+.Bd -literal -offset indent
+struct relocation_info {
+ int r_address;
+ unsigned int r_symbolnum : 24,
+ r_pcrel : 1,
+ r_length : 2,
+ r_extern : 1,
+ : 4;
+};
+.Ed
+.Pp
+The
+.Fa relocation_info
+fields are used as follows:
+.Bl -tag -width r_symbolnum
+.It Fa r_address
+Contains the byte offset of a pointer that needs to be link-edited.
+Text relocation offsets are reckoned from the start of the text segment,
+and data relocation offsets from the start of the data segment.
+The link editor adds the value that is already stored at this offset
+into the new value that it computes using this relocation record.
+.It Fa r_symbolnum
+Contains the ordinal number of a symbol structure
+in the symbol table (it is
+.Em not
+a byte offset).
+After the link editor resolves the absolute address for this symbol,
+it adds that address to the pointer that is undergoing relocation.
+(If the
+.Fa r_extern
+bit is clear, the situation is different; see below.)
+.It Fa r_pcrel
+If this is set,
+the link editor assumes that it is updating a pointer
+that is part of a machine code instruction using pc-relative addressing.
+The address of the relocated pointer is implicitly added
+to its value when the running program uses it.
+.It Fa r_length
+Contains the log base 2 of the length of the pointer in bytes;
+0 for 1-byte displacements, 1 for 2-byte displacements,
+2 for 4-byte displacements.
+.It Fa r_extern
+Set if this relocation requires an external reference;
+the link editor must use a symbol address to update the pointer.
+When the
+.Fa r_extern
+bit is clear, the relocation is
+.Sq local ;
+the link editor updates the pointer to reflect
+changes in the load addresses of the various segments,
+rather than changes in the value of a symbol.
+In this case, the content of the
+.Fa r_symbolnum
+field is an
+.Fa n_type
+value (see below);
+this type field tells the link editor
+what segment the relocated pointer points into.
+.El
+.Pp
+Symbols map names to addresses (or more generally, strings to values).
+Since the link-editor adjusts addresses,
+a symbol's name must be used to stand for its address
+until an absolute value has been assigned.
+Symbols consist of a fixed-length record in the symbol table
+and a variable-length name in the string table.
+The symbol table is an array of
+.Fa nlist
+structures:
+.Bd -literal -offset indent
+struct nlist {
+ union {
+ char *n_name;
+ long n_strx;
+ } n_un;
+ unsigned char n_type;
+ char n_other;
+ short n_desc;
+ unsigned long n_value;
+};
+.Ed
+.Pp
+The fields are used as follows:
+.Bl -tag -width n_un.n_strx
+.It Fa n_un.n_strx
+Contains a byte offset into the string table
+for the name of this symbol.
+When a program accesses a symbol table with the
+.Xr nlist 3
+function,
+this field is replaced with the
+.Fa n_un.n_name
+field, which is a pointer to the string in memory.
+.It Fa n_type
+Used by the link editor to determine
+how to update the symbol's value.
+The
+.Fa n_type
+field is broken down into three sub-fields using bitmasks.
+The link editor treats symbols with the
+.Dv N_EXT
+type bit set as
+.Sq external
+symbols and permits references to them from other binary files.
+The
+.Dv N_TYPE
+mask selects bits of interest to the link editor:
+.Bl -tag -width N_TEXT
+.It Dv N_UNDF
+An undefined symbol.
+The link editor must locate an external symbol with the same name
+in another binary file to determine the absolute value of this symbol.
+As a special case, if the
+.Fa n_value
+field is nonzero and no binary file in the link-edit defines this symbol,
+the link-editor will resolve this symbol to an address
+in the bss segment,
+reserving an amount of bytes equal to
+.Fa n_value .
+If this symbol is undefined in more than one binary file
+and the binary files do not agree on the size,
+the link editor chooses the greatest size found across all binaries.
+.It Dv N_ABS
+An absolute symbol.
+The link editor does not update an absolute symbol.
+.It Dv N_TEXT
+A text symbol.
+This symbol's value is a text address and
+the link editor will update it when it merges binary files.
+.It Dv N_DATA
+A data symbol; similar to
+.Dv N_TEXT
+but for data addresses.
+The values for text and data symbols are not file offsets but
+addresses; to recover the file offsets, it is necessary
+to identify the loaded address of the beginning of the corresponding
+section and subtract it, then add the offset of the section.
+.It Dv N_BSS
+A bss symbol; like text or data symbols but
+has no corresponding offset in the binary file.
+.It Dv N_FN
+A filename symbol.
+The link editor inserts this symbol before
+the other symbols from a binary file when
+merging binary files.
+The name of the symbol is the filename given to the link editor,
+and its value is the first text address from that binary file.
+Filename symbols are not needed for link-editing or loading,
+but are useful for debuggers.
+.El
+.Pp
+The
+.Dv N_STAB
+mask selects bits of interest to symbolic debuggers
+such as
+.Xr gdb 1 ;
+the values are described in
+.Xr stab 5 .
+.It Fa n_other
+This field is currently unused.
+.It Fa n_desc
+Reserved for use by debuggers; passed untouched by the link editor.
+Different debuggers use this field for different purposes.
+.It Fa n_value
+Contains the value of the symbol.
+For text, data and bss symbols, this is an address;
+for other symbols (such as debugger symbols),
+the value may be arbitrary.
+.El
+.Pp
+The string table consists of an
+.Em unsigned long
+length followed by null-terminated symbol strings.
+The length represents the size of the entire table in bytes,
+so its minimum value (or the offset of the first string)
+is always 4 on 32-bit machines.
+.Sh SEE ALSO
+.Xr ld 1 ,
+.Xr execve 2 ,
+.Xr nlist 3 ,
+.Xr core 5 ,
+.Xr dbx 5 ,
+.Xr stab 5
+.Sh HISTORY
+The
+.Pa a.out.h
+include file appeared in
+.At v7 .
+.Sh BUGS
+Since not all of the supported architectures use the
+.Fa a_mid
+field,
+it can be difficult to determine what
+architecture a binary will execute on
+without examining its actual machine code.
+Even with a machine identifier,
+the byte order of the
+.Fa exec
+header is machine-dependent.
+.Pp
+Nobody seems to agree on what
+.Em bss
+stands for.
+.Pp
+New binary file formats may be supported in the future,
+and they probably will not be compatible at any level
+with this ancient format.
diff --git a/share/man/man5/acct.5 b/share/man/man5/acct.5
new file mode 100644
index 0000000..7cb4c3d
--- /dev/null
+++ b/share/man/man5/acct.5
@@ -0,0 +1,110 @@
+.\" Copyright (c) 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)acct.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt ACCT 5
+.Os
+.Sh NAME
+.Nm acct
+.Nd execution accounting file
+.Sh SYNOPSIS
+.Fd #include <sys/acct.h>
+.Sh DESCRIPTION
+The kernel maintains the following
+.Fa acct
+information structure for all
+processes. If a process terminates, and accounting is enabled,
+the kernel calls the
+.Xr acct 2
+function call to prepare and append the record
+to the accounting file.
+.Bd -literal
+/*
+ * Accounting structures; these use a comp_t type which is a 3 bits base 8
+ * exponent, 13 bit fraction ``floating point'' number. Units are 1/AHZ
+ * seconds.
+ */
+typedef u_short comp_t;
+
+struct acct {
+ char ac_comm[10]; /* name of command */
+ comp_t ac_utime; /* user time */
+ comp_t ac_stime; /* system time */
+ comp_t ac_etime; /* elapsed time */
+ time_t ac_btime; /* starting time */
+ uid_t ac_uid; /* user id */
+ gid_t ac_gid; /* group id */
+ short ac_mem; /* memory usage average */
+ comp_t ac_io; /* count of IO blocks */
+ dev_t ac_tty; /* controlling tty */
+#define AFORK 0x01 /* forked but not execed */
+#define ASU 0x02 /* used super-user permissions */
+#define ACOMPAT 0x04 /* used compatibility mode */
+#define ACORE 0x08 /* dumped core */
+#define AXSIG 0x10 /* killed by a signal */
+ char ac_flag; /* accounting flags */
+};
+
+/*
+ * 1/AHZ is the granularity of the data encoded in the comp_t fields.
+ * This is not necessarily equal to hz.
+ */
+#define AHZ 64
+
+#ifdef KERNEL
+struct vnode *acctp;
+#endif
+.Ed
+.Pp
+If a terminated process was created by an
+.Xr execve 2 ,
+the name of the executed file (at most ten characters of it)
+is saved in the field
+.Fa ac_comm
+and its status is saved by setting one of more of the following flags in
+.Fa ac_flag:
+.Dv AFORK ,
+.Dv ASU ,
+.Dv ACOMPAT ,
+.Dv ACORE
+and
+.Dv ASIG .
+.Sh SEE ALSO
+.Xr acct 2 ,
+.Xr execve 2 ,
+.Xr sa 8
+.Sh HISTORY
+A
+.Nm
+file format appeared in
+.At v7 .
diff --git a/share/man/man5/core.5 b/share/man/man5/core.5
new file mode 100644
index 0000000..e4b5f47
--- /dev/null
+++ b/share/man/man5/core.5
@@ -0,0 +1,111 @@
+.\" Copyright (c) 1980, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)core.5 8.3 (Berkeley) 12/11/93
+.\"
+.Dd December 11, 1993
+.Dt CORE 5
+.Os BSD 4
+.Sh NAME
+.Nm core
+.Nd memory image file format
+.Sh SYNOPSIS
+.Fd #include <sys/param.h>
+.Sh DESCRIPTION
+A small number of signals which cause abnormal termination of a process
+also cause a record of the process's in-core state to be written
+to disk for later examination by one of the available debuggers.
+(See
+.Xr sigaction 2 . )
+This memory image is written to a file named
+.Nm programname.core
+in the working directory;
+provided the terminated process had write permission in the directory,
+and provided the abnormality did not cause
+a system crash.
+(In this event, the decision to save the core file is arbitrary, see
+.Xr savecore 8 . )
+.Pp
+The maximum size of a
+.Nm programname.core
+file is limited by
+.Xr setrlimit 2 .
+Files which would be larger than the limit are not created.
+.Pp
+The
+.Nm programname.core
+file consists of the
+.Fa u .
+area, whose size (in pages) is
+defined by the
+.Dv UPAGES
+manifest in the
+.Aq Pa sys/param.h
+file. The
+.Fa u .
+area starts with a
+.Fa user
+structure as given in
+.Aq Pa sys/user.h .
+The remainder of the
+.Nm programname.core
+file consists of the data pages followed by
+the stack pages of the process image.
+The amount of data space image in the
+.Nm programname.core
+file is given (in pages) by the
+variable
+.Fa u_dsize
+in the
+.Fa u .
+area.
+The amount of stack image in the core file is given (in pages) by the
+variable
+.Fa u_ssize
+in the
+.Ar u .
+area.
+The size of a ``page'' is given by the constant
+.Dv NBPG
+(also from
+.Aq Pa sys/param.h ) .
+.Sh SEE ALSO
+.Xr adb 1 ,
+.Xr dbx 1 ,
+.Xr gdb 1 ,
+.Xr kgdb 1 ,
+.Xr sigaction 2 ,
+.Xr setrlimit 2
+.Sh HISTORY
+A
+.Nm core
+file format appeared in
+.At v6 .
diff --git a/share/man/man5/dir.5 b/share/man/man5/dir.5
new file mode 100644
index 0000000..39d7b77
--- /dev/null
+++ b/share/man/man5/dir.5
@@ -0,0 +1,151 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)dir.5 8.3 (Berkeley) 4/19/94
+.\"
+.Dd April 19, 1994
+.Dt DIR 5
+.Os BSD 4.2
+.Sh NAME
+.Nm dir ,
+.Nm dirent
+.Nd directory file format
+.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <sys/dir.h>
+.Sh DESCRIPTION
+Directories provide a convenient hierarchical method of grouping
+files while obscuring the underlying details of the storage medium.
+A directory file is differentiated from a plain file
+by a flag in its
+.Xr inode 5
+entry.
+It consists of records (directory entries) each of which contains
+information about a file and a pointer to the file itself.
+Directory entries may contain other directories
+as well as plain files; such nested directories are refered to as
+subdirectories.
+A hierarchy of directories and files is formed in this manner
+and is called a file system (or referred to as a file system tree).
+.\" An entry in this tree,
+.\" nested or not nested,
+.\" is a pathname.
+.Pp
+Each directory file contains two special directory entries; one is a pointer
+to the directory itself
+called dot
+.Ql \&.
+and the other a pointer to its parent directory called dot-dot
+.Ql \&.. .
+Dot and dot-dot
+are valid pathnames, however,
+the system root directory
+.Ql / ,
+has no parent and dot-dot points to itself like dot.
+.Pp
+File system nodes are ordinary directory files on which has
+been grafted a file system object, such as a physical disk or a
+partitioned area of such a disk.
+(See
+.Xr mount 1
+and
+.Xr mount 8 . )
+.Pp
+The directory entry format is defined in the file
+.Aq dirent.h :
+.Bd -literal
+#ifndef _DIRENT_H_
+#define _DIRENT_H_
+
+/*
+* A directory entry has a struct dirent at the front of it, containing its
+* inode number, the length of the entry, and the length of the name
+* contained in the entry. These are followed by the name padded to a 4
+* byte boundary with null bytes. All names are guaranteed null terminated.
+* The maximum length of a name in a directory is MAXNAMLEN.
+*/
+
+struct dirent {
+ u_long d_fileno; /* file number of entry */
+ u_short d_reclen; /* length of this record */
+ u_short d_namlen; /* length of string in d_name */
+#ifdef _POSIX_SOURCE
+ char d_name[MAXNAMLEN + 1]; /* maximum name length */
+#else
+#define MAXNAMLEN 255
+ char d_name[MAXNAMLEN + 1]; /* maximum name length */
+#endif
+
+};
+
+#ifdef _POSIX_SOURCE
+typedef void * DIR;
+#else
+
+#define d_ino d_fileno /* backward compatibility */
+
+/* definitions for library routines operating on directories. */
+#define DIRBLKSIZ 1024
+
+/* structure describing an open directory. */
+typedef struct _dirdesc {
+ int dd_fd; /* file descriptor associated with directory */
+ long dd_loc; /* offset in current buffer */
+ long dd_size; /* amount of data returned by getdirentries */
+ char *dd_buf; /* data buffer */
+ int dd_len; /* size of data buffer */
+ long dd_seek; /* magic cookie returned by getdirentries */
+} DIR;
+
+#define dirfd(dirp) ((dirp)->dd_fd)
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#endif /* _POSIX_SOURCE */
+
+#ifndef KERNEL
+
+#include <sys/cdefs.h>
+
+#endif /* !KERNEL */
+
+#endif /* !_DIRENT_H_ */
+.Ed
+.Sh SEE ALSO
+.Xr fs 5
+.Xr inode 5
+.Sh HISTORY
+A
+.Nm
+file format appeared in
+.At v7 .
diff --git a/share/man/man5/disktab.5 b/share/man/man5/disktab.5
new file mode 100644
index 0000000..6fd204a
--- /dev/null
+++ b/share/man/man5/disktab.5
@@ -0,0 +1,142 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)disktab.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt DISKTAB 5
+.Os BSD 4.2
+.Sh NAME
+.Nm disktab
+.Nd disk description file
+.Sh SYNOPSIS
+.Fd #include <disktab.h>
+.Sh DESCRIPTION
+.Nm Disktab
+is a simple database which describes disk geometries and
+disk partition characteristics.
+It is used
+.\"by the formatter(\c
+.\"IR.Xr format 8 )
+.\"to determine how to format the disk, and
+to initialize the disk label on the disk.
+The format is patterned
+after the
+.Xr termcap 5
+terminal data base. Entries in
+.Nm disktab
+consist of a number of `:' separated fields. The
+first entry for each disk gives the names which are
+known for the disk, separated by `|' characters. The
+last name given should be a long name fully identifying
+the disk.
+.Pp
+The following list indicates the normal values
+stored for each disk entry.
+.Bl -column "indent" "boolx"
+.It Sy Name Type Description
+.It "\&ty str Type of disk (e.g. removable, winchester)"
+.It "\&dt str Type of controller (e.g."
+.Tn SMD , ESDI ,
+floppy)
+.It "\&ns num Number of sectors per track"
+.It "\&nt num Number of tracks per cylinder"
+.It "\&nc num Total number of cylinders on the disk"
+.It "\&sc num Number of sectors per cylinder, nc*nt default"
+.It "\&su num Number of sectors per unit, sc*nc default"
+.It "\&se num Sector size in bytes,"
+.Dv DEV_BSIZE
+default
+.It "\&sf bool Controller supports bad144-style bad sector forwarding"
+.It "\&rm num Rotation speed, rpm, 3600 default"
+.It "\&sk num Sector skew per track, default 0"
+.It "\&cs num Sector skew per cylinder, default 0"
+.It "\&hs num Headswitch time, usec, default 0"
+.It "\&ts num One-cylinder seek time, usec, default 0"
+.It "\&il num Sector interleave (n:1), 1 default"
+.It "\&d[0-4] num Drive-type-dependent parameters"
+.It "\&bs num Boot block size, default"
+.Dv BBSIZE
+.It "\&sb num Superblock size, default"
+.Dv SBSIZE
+.It "\&ba num Block size for partition `a' (bytes)"
+.It "\&bd num Block size for partition `d' (bytes)"
+.It "\&be num Block size for partition `e' (bytes)"
+.It "\&bf num Block size for partition `f' (bytes)"
+.It "\&bg num Block size for partition `g' (bytes)"
+.It "\&bh num Block size for partition `h' (bytes)"
+.It "\&fa num Fragment size for partition `a' (bytes)"
+.It "\&fd num Fragment size for partition `d' (bytes)"
+.It "\&fe num Fragment size or partition `e' (bytes)"
+.It "\&ff num Fragment size for partition `f' (bytes)"
+.It "\&fg num Fragment size for partition `g' (bytes)"
+.It "\&fh num Fragment size for partition `h' (bytes)"
+.It "\&oa num Offset of partition `a' in sectors"
+.It "\&ob num Offset of partition `b' in sectors"
+.It "\&oc num Offset of partition `c' in sectors"
+.It "\&od num Offset of partition `d' in sectors"
+.It "\&oe num Offset of partition `e' in sectors"
+.It "\&of num Offset of partition `f' in sectors"
+.It "\&og num Offset of partition `g' in sectors"
+.It "\&oh num Offset of partition `h' in sectors"
+.It "\&pa num Size of partition `a' in sectors"
+.It "\&pb num Size of partition `b' in sectors"
+.It "\&pc num Size of partition `c' in sectors"
+.It "\&pd num Size of partition `d' in sectors"
+.It "\&pe num Size of partition `e' in sectors"
+.It "\&pf num Size of partition `f' in sectors"
+.It "\&pg num Size of partition `g' in sectors"
+.It "\&ph num Size of partition `h' in sectors"
+.It "\&ta str Partition type of partition `a'"
+.Pf ( Bx 4.2
+filesystem, swap, etc)
+.It "\&tb str Partition type of partition `b'"
+.It "\&tc str Partition type of partition `c'"
+.It "\&td str Partition type of partition `d'"
+.It "\&te str Partition type of partition `e'"
+.It "\&tf str Partition type of partition `f'"
+.It "\&tg str Partition type of partition `g'"
+.It "\&th str Partition type of partition `h'"
+.El
+.Sh FILES
+.Bl -tag -width /etc/disktab -compact
+.It Pa /etc/disktab
+.El
+.Sh SEE ALSO
+.Xr getdiskbyname 3 ,
+.Xr disklabel 5 ,
+.Xr disklabel 8 ,
+.Xr newfs 8
+.Sh HISTORY
+The
+.Nm
+description file appeared in
+.Bx 4.2 .
diff --git a/share/man/man5/fs.5 b/share/man/man5/fs.5
new file mode 100644
index 0000000..12bb912
--- /dev/null
+++ b/share/man/man5/fs.5
@@ -0,0 +1,342 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)fs.5 8.2 (Berkeley) 4/19/94
+.\"
+.Dd April 19, 1994
+.Dt FS 5
+.Os BSD 4.2
+.Sh NAME
+.Nm fs ,
+.Nm inode
+.Nd format of file system volume
+.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <ufs/fs.h>
+.Fd #include <ufs/inode.h>
+.Sh DESCRIPTION
+The files
+.Aq Pa fs.h
+and
+.Aq Pa inode.h
+declare several structures, defined variables and macros
+which are used to create and manage the underlying format of
+file system objects on random access devices (disks).
+.Pp
+The block size and number of blocks which
+comprise a file system are parameters of the file system.
+Sectors beginning at
+.Dv BBLOCK
+and continuing for
+.Dv BBSIZE
+are used
+for a disklabel and for some hardware primary
+and secondary bootstrapping programs.
+.Pp
+The actual file system begins at sector
+.Dv SBLOCK
+with the
+.Em super-block
+that is of size
+.Dv SBSIZE .
+The following structure described the super-block and is
+from the file
+.Aq Pa ufs/fs.h :
+.Bd -literal
+#define FS_MAGIC 0x011954
+struct fs {
+ struct fs *fs_link; /* linked list of file systems */
+ struct fs *fs_rlink; /* used for incore super blocks */
+ daddr_t fs_sblkno; /* addr of super-block in filesys */
+ daddr_t fs_cblkno; /* offset of cyl-block in filesys */
+ daddr_t fs_iblkno; /* offset of inode-blocks in filesys */
+ daddr_t fs_dblkno; /* offset of first data after cg */
+ long fs_cgoffset; /* cylinder group offset in cylinder */
+ long fs_cgmask; /* used to calc mod fs_ntrak */
+ time_t fs_time; /* last time written */
+ long fs_size; /* number of blocks in fs */
+ long fs_dsize; /* number of data blocks in fs */
+ long fs_ncg; /* number of cylinder groups */
+ long fs_bsize; /* size of basic blocks in fs */
+ long fs_fsize; /* size of frag blocks in fs */
+ long fs_frag; /* number of frags in a block in fs */
+/* these are configuration parameters */
+ long fs_minfree; /* minimum percentage of free blocks */
+ long fs_rotdelay; /* num of ms for optimal next block */
+ long fs_rps; /* disk revolutions per second */
+/* these fields can be computed from the others */
+ long fs_bmask; /* ``blkoff'' calc of blk offsets */
+ long fs_fmask; /* ``fragoff'' calc of frag offsets */
+ long fs_bshift; /* ``lblkno'' calc of logical blkno */
+ long fs_fshift; /* ``numfrags'' calc number of frags */
+/* these are configuration parameters */
+ long fs_maxcontig; /* max number of contiguous blks */
+ long fs_maxbpg; /* max number of blks per cyl group */
+/* these fields can be computed from the others */
+ long fs_fragshift; /* block to frag shift */
+ long fs_fsbtodb; /* fsbtodb and dbtofsb shift constant */
+ long fs_sbsize; /* actual size of super block */
+ long fs_csmask; /* csum block offset */
+ long fs_csshift; /* csum block number */
+ long fs_nindir; /* value of NINDIR */
+ long fs_inopb; /* value of INOPB */
+ long fs_nspf; /* value of NSPF */
+/* yet another configuration parameter */
+ long fs_optim; /* optimization preference, see below */
+/* these fields are derived from the hardware */
+ long fs_npsect; /* # sectors/track including spares */
+ long fs_interleave; /* hardware sector interleave */
+ long fs_trackskew; /* sector 0 skew, per track */
+ long fs_headswitch; /* head switch time, usec */
+ long fs_trkseek; /* track-to-track seek, usec */
+/* sizes determined by number of cylinder groups and their sizes */
+ daddr_t fs_csaddr; /* blk addr of cyl grp summary area */
+ long fs_cssize; /* size of cyl grp summary area */
+ long fs_cgsize; /* cylinder group size */
+/* these fields are derived from the hardware */
+ long fs_ntrak; /* tracks per cylinder */
+ long fs_nsect; /* sectors per track */
+ long fs_spc; /* sectors per cylinder */
+/* this comes from the disk driver partitioning */
+ long fs_ncyl; /* cylinders in file system */
+/* these fields can be computed from the others */
+ long fs_cpg; /* cylinders per group */
+ long fs_ipg; /* inodes per group */
+ long fs_fpg; /* blocks per group * fs_frag */
+/* this data must be re-computed after crashes */
+ struct csum fs_cstotal; /* cylinder summary information */
+/* these fields are cleared at mount time */
+ char fs_fmod; /* super block modified flag */
+ char fs_clean; /* file system is clean flag */
+ char fs_ronly; /* mounted read-only flag */
+ char fs_flags; /* currently unused flag */
+ char fs_fsmnt[MAXMNTLEN]; /* name mounted on */
+/* these fields retain the current block allocation info */
+ long fs_cgrotor; /* last cg searched */
+ struct csum *fs_csp[MAXCSBUFS]; /* list of fs_cs info buffers */
+ long fs_cpc; /* cyl per cycle in postbl */
+ short fs_opostbl[16][8]; /* old rotation block list head */
+ long fs_sparecon[56]; /* reserved for future constants */
+ quad fs_qbmask; /* ~fs_bmask - for use with quad size */
+ quad fs_qfmask; /* ~fs_fmask - for use with quad size */
+ long fs_postblformat; /* format of positional layout tables */
+ long fs_nrpos; /* number of rotational positions */
+ long fs_postbloff; /* (short) rotation block list head */
+ long fs_rotbloff; /* (u_char) blocks for each rotation */
+ long fs_magic; /* magic number */
+ u_char fs_space[1]; /* list of blocks for each rotation */
+/* actually longer */
+};
+.Ed
+.Pp
+Each disk drive contains some number of file systems.
+A file system consists of a number of cylinder groups.
+Each cylinder group has inodes and data.
+.Pp
+A file system is described by its super-block, which in turn
+describes the cylinder groups. The super-block is critical
+data and is replicated in each cylinder group to protect against
+catastrophic loss. This is done at file system creation
+time and the critical
+super-block data does not change, so the copies need not be
+referenced further unless disaster strikes.
+.Pp
+Addresses stored in inodes are capable of addressing fragments
+of `blocks'. File system blocks of at most size
+.Dv MAXBSIZE
+can
+be optionally broken into 2, 4, or 8 pieces, each of which is
+addressable; these pieces may be
+.Dv DEV_BSIZE ,
+or some multiple of
+a
+.Dv DEV_BSIZE
+unit.
+.Pp
+Large files consist of exclusively large data blocks. To avoid
+undue wasted disk space, the last data block of a small file is
+allocated as only as many fragments of a large block as are
+necessary. The file system format retains only a single pointer
+to such a fragment, which is a piece of a single large block that
+has been divided. The size of such a fragment is determinable from
+information in the inode, using the
+.Fn blksize fs ip lbn
+macro.
+.Pp
+The file system records space availability at the fragment level;
+to determine block availability, aligned fragments are examined.
+.Pp
+The root inode is the root of the file system.
+Inode 0 can't be used for normal purposes and
+historically bad blocks were linked to inode 1,
+thus the root inode is 2 (inode 1 is no longer used for
+this purpose, however numerous dump tapes make this
+assumption, so we are stuck with it).
+.Pp
+The
+.Fa fs_minfree
+element gives the minimum acceptable percentage of file system
+blocks that may be free. If the freelist drops below this level
+only the super-user may continue to allocate blocks.
+The
+.Fa fs_minfree
+element
+may be set to 0 if no reserve of free blocks is deemed necessary,
+however severe performance degradations will be observed if the
+file system is run at greater than 90% full; thus the default
+value of
+.Fa fs_minfree
+is 10%.
+.Pp
+Empirically the best trade-off between block fragmentation and
+overall disk utilization at a loading of 90% comes with a
+fragmentation of 8, thus the default fragment size is an eighth
+of the block size.
+.Pp
+The element
+.Fa fs_optim
+specifies whether the file system should try to minimize the time spent
+allocating blocks, or if it should attempt to minimize the space
+fragmentation on the disk.
+If the value of fs_minfree (see above) is less than 10%,
+then the file system defaults to optimizing for space to avoid
+running out of full sized blocks.
+If the value of minfree is greater than or equal to 10%,
+fragmentation is unlikely to be problematical, and
+the file system defaults to optimizing for time.
+.Pp
+.Em Cylinder group related limits :
+Each cylinder keeps track of the availability of blocks at different
+rotational positions, so that sequential blocks can be laid out
+with minimum rotational latency. With the default of 8 distinguished
+rotational positions, the resolution of the
+summary information is 2ms for a typical 3600 rpm drive.
+.Pp
+The element
+.Fa fs_rotdelay
+gives the minimum number of milliseconds to initiate
+another disk transfer on the same cylinder.
+It is used in determining the rotationally optimal
+layout for disk blocks within a file;
+the default value for
+.Fa fs_rotdelay
+is 2ms.
+.Pp
+Each file system has a statically allocated number of inodes.
+An inode is allocated for each
+.Dv NBPI
+bytes of disk space.
+The inode allocation strategy is extremely conservative.
+.Pp
+.Dv MINBSIZE
+is the smallest allowable block size.
+With a
+.Dv MINBSIZE
+of 4096
+it is possible to create files of size
+2^32 with only two levels of indirection.
+.Dv MINBSIZE
+must be big enough to hold a cylinder group block,
+thus changes to
+.Pq Fa struct cg
+must keep its size within
+.Dv MINBSIZE .
+Note that super-blocks are never more than size
+.Dv SBSIZE .
+.Pp
+The path name on which the file system is mounted is maintained in
+.Fa fs_fsmnt .
+.Dv MAXMNTLEN
+defines the amount of space allocated in
+the super-block for this name.
+The limit on the amount of summary information per file system
+is defined by
+.Dv MAXCSBUFS.
+For a 4096 byte block size, it is currently parameterized for a
+maximum of two million cylinders.
+.Pp
+Per cylinder group information is summarized in blocks allocated
+from the first cylinder group's data blocks.
+These blocks are read in from
+.Fa fs_csaddr
+(size
+.Fa fs_cssize )
+in addition to the super-block.
+.Pp
+.Sy N.B.:
+.Xr sizeof Pq Fa struct csum
+must be a power of two in order for
+the
+.Fn fs_cs
+macro to work.
+.Pp
+The
+.Em "Super-block for a file system" :
+The size of the rotational layout tables
+is limited by the fact that the super-block is of size
+.Dv SBSIZE .
+The size of these tables is
+.Em inversely
+proportional to the block
+size of the file system. The size of the tables is
+increased when sector sizes are not powers of two,
+as this increases the number of cylinders
+included before the rotational pattern repeats
+.Pq Fa fs_cpc .
+The size of the rotational layout
+tables is derived from the number of bytes remaining in
+.Pq Fa struct fs .
+.Pp
+The number of blocks of data per cylinder group
+is limited because cylinder groups are at most one block.
+The inode and free block tables
+must fit into a single block after deducting space for
+the cylinder group structure
+.Pq Fa struct cg .
+.Pp
+The
+.Em Inode :
+The inode is the focus of all file activity in the
+.Tn UNIX
+file system.
+There is a unique inode allocated
+for each active file,
+each current directory, each mounted-on file,
+text file, and the root.
+An inode is `named' by its device/i-number pair.
+For further information, see the include file
+.Aq Pa sys/inode.h .
+.Sh HISTORY
+A super-block structure named filsys appeared in
+.At v6 .
+The file system described in this manual appeared
+in
+.Bx 4.2 .
diff --git a/share/man/man5/fstab.5 b/share/man/man5/fstab.5
new file mode 100644
index 0000000..7949e56
--- /dev/null
+++ b/share/man/man5/fstab.5
@@ -0,0 +1,226 @@
+.\" Copyright (c) 1980, 1989, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)fstab.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt FSTAB 5
+.Os BSD 4
+.Sh NAME
+.Nm fstab
+.Nd static information about the filesystems
+.Sh SYNOPSIS
+.Fd #include <fstab.h>
+.Sh DESCRIPTION
+The file
+.Nm fstab
+contains descriptive information about the various file
+systems.
+.Nm fstab
+is only read by programs, and not written;
+it is the duty of the system administrator to properly create
+and maintain this file.
+Each filesystem is described on a separate line;
+fields on each line are separated by tabs or spaces.
+The order of records in
+.Nm fstab
+is important because
+.Xr fsck 8 ,
+.Xr mount 8 ,
+and
+.Xr umount 8
+sequentially iterate through
+.Nm fstab
+doing their thing.
+.Pp
+The first field,
+.Pq Fa fs_spec ,
+describes the block special device or
+remote filesystem to be mounted.
+For filesystems of type
+.Em ufs ,
+the special file name is the block special file name,
+and not the character special file name.
+If a program needs the character special file name,
+the program must create it by appending a ``r'' after the
+last ``/'' in the special file name.
+.Pp
+The second field,
+.Pq Fa fs_file ,
+describes the mount point for the filesystem.
+For swap partitions, this field should be specified as ``none''.
+.Pp
+The third field,
+.Pq Fa fs_vfstype ,
+describes the type of the filesystem.
+The system currently supports four types of filesystems:
+.Bl -tag -width indent -offset indent
+.It Em ufs
+a local
+.Tn UNIX
+filesystem
+.It Em mfs
+a local memory-based
+.Tn UNIX
+filesystem
+.It Em nfs
+a Sun Microsystems compatible ``Network File System''
+.It Em swap
+a disk partition to be used for swapping
+.El
+.Pp
+The fourth field,
+.Pq Fa fs_mntops ,
+describes the mount options associated with the filesystem.
+It is formatted as a comma separated list of options.
+It contains at least the type of mount (see
+.Fa fs_type
+below) plus any additional options
+appropriate to the filesystem type.
+.Pp
+If the options ``userquota'' and/or ``groupquota'' are specified,
+the filesystem is automatically processed by the
+.Xr quotacheck 8
+command, and user and/or group disk quotas are enabled with
+.Xr quotaon 8 .
+By default,
+filesystem quotas are maintained in files named
+.Pa quota.user
+and
+.Pa quota.group
+which are located at the root of the associated filesystem.
+These defaults may be overridden by putting an equal sign
+and an alternative absolute pathname following the quota option.
+Thus, if the user quota file for
+.Pa /tmp
+is stored in
+.Pa /var/quotas/tmp.user ,
+this location can be specified as:
+.Bd -literal -offset indent
+userquota=/var/quotas/tmp.user
+.Ed
+.Pp
+The type of the mount is extracted from the
+.Fa fs_mntops
+field and stored separately in the
+.Fa fs_type
+field (it is not deleted from the
+.Fa fs_mntops
+field).
+If
+.Fa fs_type
+is ``rw'' or ``ro'' then the filesystem whose name is given in the
+.Fa fs_file
+field is normally mounted read-write or read-only on the
+specified special file.
+If
+.Fa fs_type
+is ``sw'' then the special file is made available as a piece of swap
+space by the
+.Xr swapon 8
+command at the end of the system reboot procedure.
+The fields other than
+.Fa fs_spec
+and
+.Fa fs_type
+are unused.
+If
+.Fa fs_type
+is specified as ``xx'' the entry is ignored.
+This is useful to show disk partitions which are currently unused.
+.Pp
+The fifth field,
+.Pq Fa fs_freq ,
+is used for these filesystems by the
+.Xr dump 8
+command to determine which filesystems need to be dumped.
+If the fifth field is not present, a value of zero is returned and
+.Xr dump
+will assume that the filesystem does not need to be dumped.
+.Pp
+The sixth field,
+.Pq Fa fs_passno ,
+is used by the
+.Xr fsck 8
+program to determine the order in which filesystem checks are done
+at reboot time.
+The root filesystem should be specified with a
+.Fa fs_passno
+of 1, and other filesystems should have a
+.Fa fs_passno
+of 2.
+Filesystems within a drive will be checked sequentially,
+but filesystems on different drives will be checked at the
+same time to utilize parallelism available in the hardware.
+If the sixth field is not present or zero,
+a value of zero is returned and
+.Xr fsck
+will assume that the filesystem does not need to be checked.
+.Bd -literal
+#define FSTAB_RW "rw" /* read-write device */
+#define FSTAB_RO "ro" /* read-only device */
+#define FSTAB_SW "sw" /* swap device */
+#define FSTAB_XX "xx" /* ignore totally */
+
+struct fstab {
+ char *fs_spec; /* block special device name */
+ char *fs_file; /* filesystem path prefix */
+ char *fs_vfstype; /* type of filesystem */
+ char *fs_mntops; /* comma separated mount options */
+ char *fs_type; /* rw, ro, sw, or xx */
+ int fs_freq; /* dump frequency, in days */
+ int fs_passno; /* pass number on parallel dump */
+};
+.Ed
+.Pp
+The proper way to read records from
+.Pa fstab
+is to use the routines
+.Xr getfsent 3 ,
+.Xr getfsspec 3 ,
+.Xr getfstype 3 ,
+and
+.Xr getfsfile 3 .
+.Sh FILES
+.Bl -tag -width /etc/fstab -compact
+.It Pa /etc/fstab
+The file
+.Nm fstab
+resides in
+.Pa /etc .
+.El
+.Sh SEE ALSO
+.Xr getfsent 3
+.Sh HISTORY
+The
+.Nm
+file format appeared in
+.Bx 4.0 .
diff --git a/share/man/man5/group.5 b/share/man/man5/group.5
new file mode 100644
index 0000000..958494b
--- /dev/null
+++ b/share/man/man5/group.5
@@ -0,0 +1,123 @@
+.\" Copyright (c) 1980, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)group.5 8.3 (Berkeley) 4/19/94
+.\"
+.Dd April 19, 1994
+.Dt GROUP 5
+.Os
+.Sh NAME
+.Nm group
+.Nd format of the group permissions file
+.Sh DESCRIPTION
+The file
+.Aq Pa /etc/group
+consists of newline separated
+.Tn ASCII
+records, one per group, containing four colon
+.Ql \&:
+separated fields. These fields are as follows:
+.Bl -tag -width password -offset indent -compact
+.It group
+Name of the group.
+.It passwd
+Group's
+.Em encrypted
+password.
+.It gid
+The group's decimal ID.
+.It member
+Group members.
+.El
+.Pp
+The
+.Ar group
+field is the group name used for granting file access to users
+who are members of the group.
+The
+.Ar gid
+field is the number associated with the group name.
+They should both be unique across the system (and often
+across a group of systems) since they control file access.
+The
+.Ar passwd
+field
+is an optional
+.Em encrypted
+password.
+This field is rarely used
+and an asterisk is normally placed in it rather than leaving it blank.
+The
+.Ar member
+field contains the names of users granted the privileges of
+.Ar group .
+The member names are separated by commas without spaces or newlines.
+A user is automatically in a group if that group was specified
+in their
+.Pa /etc/passwd
+entry and does not need to be added to that group in the
+.Pa /etc/group file.
+.\" .Pp
+.\" When the system reads the file
+.\" .Pa /etc/group
+.\" the fields are read into the structure
+.\" .Fa group
+.\" declared in
+.\" .Aq Pa grp.h :
+.\" .Bd -literal -offset indent
+.\" struct group {
+.\" char *gr_name; /* group name */
+.\" char *gr_passwd; /* group password */
+.\" int gr_gid; /* group id */
+.\" char **gr_mem; /* group members */
+.\" };
+.\" .Ed
+.Sh FILES
+.Bl -tag -width /etc/group -compact
+.It Pa /etc/group
+.El
+.Sh SEE ALSO
+.Xr setgroups 2 ,
+.Xr initgroups 3 ,
+.Xr crypt 3 ,
+.Xr passwd 1 ,
+.Xr passwd 5
+.Sh BUGS
+The
+.Xr passwd 1
+command does not change the
+.Nm group
+passwords.
+.Sh HISTORY
+A
+.Nm
+file format appeared in
+.At v6 .
diff --git a/share/man/man5/hosts.5 b/share/man/man5/hosts.5
new file mode 100644
index 0000000..81a9587
--- /dev/null
+++ b/share/man/man5/hosts.5
@@ -0,0 +1,109 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)hosts.5 8.2 (Berkeley) 12/11/93
+.\"
+.Dd December 11, 1993
+.Dt HOSTS 5
+.Os BSD 4.2
+.Sh NAME
+.Nm hosts
+.Nd host name data base
+.Sh DESCRIPTION
+The
+.Nm hosts
+file contains information regarding
+the known hosts on the network.
+For each host a single line should be present
+with the following information:
+.Bd -unfilled -offset indent
+official host name
+Internet address
+aliases
+.Ed
+.Pp
+Items are separated by any number of blanks and/or
+tab characters. A ``#'' indicates the beginning of
+a comment; characters up to the end of the line are
+not interpreted by routines which search the file.
+.Pp
+When using the name server
+.Xr named 8 ,
+this file provides a backup when the name server
+is not running.
+For the name server, it is suggested that only a few addresses
+be included in this file.
+These include address for the local interfaces that
+.Xr ifconfig 8
+needs at boot time and a few machines on the local network.
+.Pp
+This file may be created from the official host
+data base maintained at the Network Information Control
+Center
+.Pq Tn NIC ,
+though local changes may be required
+to bring it up to date regarding unofficial aliases
+and/or unknown hosts. As the data base maintained at
+.Tn NIC
+is incomplete, use of the name server is recommended for
+sites on the
+.Tn DARPA
+Internet.
+.Pp
+Network addresses are specified in the conventional
+``.'' (dot) notation using the
+.Xr inet_addr 3
+routine
+from the Internet address manipulation library,
+.Xr inet 3 .
+Host names may contain any printable
+character other than a field delimiter, newline,
+or comment character.
+.Sh FILES
+.Bl -tag -width /etc/hosts -compact
+.It Pa /etc/hosts
+The
+.Nm hosts
+file resides in
+.Pa /etc .
+.El
+.Sh SEE ALSO
+.Xr gethostbyname 3 ,
+.Xr ifconfig 8 ,
+.Xr named 8
+.Rs
+.%T "Name Server Operations Guide for BIND"
+.Re
+.Sh HISTORY
+The
+.Nm
+file format appeared in
+.Bx 4.2 .
diff --git a/share/man/man5/networks.5 b/share/man/man5/networks.5
new file mode 100644
index 0000000..f8f4c4e
--- /dev/null
+++ b/share/man/man5/networks.5
@@ -0,0 +1,88 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)networks.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt NETWORKS 5
+.Os BSD 4.2
+.Sh NAME
+.Nm networks
+.Nd network name data base
+.Sh DESCRIPTION
+The
+.Xr networks
+file contains information regarding
+the known networks which comprise the
+.Tn DARPA
+Internet.
+For each network a single line should be present with the following information:
+.Bd -unfilled -offset indent
+official network name
+network number
+aliases
+.Ed
+.Pp
+Items are separated by any number of blanks and/or tab characters.
+A ``#'' indicates the beginning of a comment; characters up to the end of
+the line are not interpreted by routines which search the file.
+This file is normally created from the official network data base
+maintained at the Network Information Control Center
+.Pq Tn NIC ,
+though local
+changes may be required to bring it up to date regarding unofficial aliases
+and/or unknown networks.
+.Pp
+Network number may be specified in the conventional
+``.'' (dot) notation using the
+.Xr inet_network 3
+routine
+from the Internet address manipulation library,
+.Xr inet 3 .
+Network names may contain any printable character other than a field
+delimiter, newline, or comment character.
+.Sh FILES
+.Bl -tag -width /etc/networks -compact
+.It Pa /etc/networks
+The
+.Nm networks
+file resides in
+.Pa /etc .
+.El
+.Sh SEE ALSO
+.Xr getnetent 3
+.Sh BUGS
+A name server should be used instead of a static file.
+.Sh HISTORY
+The
+.Nm
+file format appeared in
+.Bx 4.2 .
diff --git a/share/man/man5/passwd.5 b/share/man/man5/passwd.5
new file mode 100644
index 0000000..584bc27
--- /dev/null
+++ b/share/man/man5/passwd.5
@@ -0,0 +1,186 @@
+.\" Copyright (c) 1988, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)passwd.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt PASSWD 5
+.Os
+.Sh NAME
+.Nm passwd
+.Nd format of the password file
+.Sh DESCRIPTION
+The
+.Nm passwd
+files are files consisting of newline separated records, one per user,
+containing ten colon (``:'') separated fields. These fields are as
+follows:
+.Pp
+.Bl -tag -width password -offset indent
+.It name
+User's login name.
+.It password
+User's
+.Em encrypted
+password.
+.It uid
+User's id.
+.It gid
+User's login group id.
+.It class
+User's general classification (unused).
+.It change
+Password change time.
+.It expire
+Account expiration time.
+.It gecos
+General information about the user.
+.It home_dir
+User's home directory.
+.It shell
+User's login shell.
+.El
+.Pp
+The
+.Ar name
+field is the login used to access the computer account, and the
+.Ar uid
+field is the number associated with it. They should both be unique
+across the system (and often across a group of systems) since they
+control file access.
+.Pp
+While it is possible to have multiple entries with identical login names
+and/or identical user id's, it is usually a mistake to do so. Routines
+that manipulate these files will often return only one of the multiple
+entries, and that one by random selection.
+.Pp
+The login name must never begin with a hyphen (``-''); also, it is strongly
+suggested that neither upper-case characters or dots (``.'') be part
+of the name, as this tends to confuse mailers. No field may contain a
+colon (``:'') as this has been used historically to separate the fields
+in the user database.
+.Pp
+The password field is the
+.Em encrypted
+form of the password.
+If the
+.Ar password
+field is empty, no password will be required to gain access to the
+machine. This is almost invariably a mistake.
+Because these files contain the encrypted user passwords, they should
+not be readable by anyone without appropriate privileges.
+.Pp
+The group field is the group that the user will be placed in upon login.
+Since this system supports multiple groups (see
+.Xr groups 1 )
+this field currently has little special meaning.
+.Pp
+The
+.Ar class
+field is currently unused. In the near future it will be a key to
+a
+.Xr termcap 5
+style database of user attributes.
+.Pp
+The
+.Ar change
+field is the number in seconds,
+.Dv GMT ,
+from the epoch, until the
+password for the account must be changed.
+This field may be left empty to turn off the password aging feature.
+.Pp
+The
+.Ar expire
+field is the number in seconds,
+.Dv GMT ,
+from the epoch, until the
+account expires.
+This field may be left empty to turn off the account aging feature.
+.Pp
+The
+.Ar gecos
+field normally contains comma (``,'') separated subfields as follows:
+.Pp
+.Bd -unfilled -offset indent
+name user's full name
+office user's office number
+wphone user's work phone number
+hphone user's home phone number
+.Ed
+.Pp
+This information is used by the
+.Xr finger 1
+program.
+.Pp
+The user's home directory is the full
+.Tn UNIX
+path name where the user
+will be placed on login.
+.Pp
+The shell field is the command interpreter the user prefers.
+If there is nothing in the
+.Ar shell
+field, the Bourne shell
+.Pq Pa /bin/sh
+is assumed.
+.Sh SEE ALSO
+.Xr chpass 1 ,
+.Xr login 1 ,
+.Xr passwd 1 ,
+.Xr getpwent 3 ,
+.Xr adduser 8 ,
+.Xr pwd_mkdb 8 ,
+.Xr vipw 8
+.Sh BUGS
+User information should (and eventually will) be stored elsewhere.
+.Sh COMPATIBILITY
+The password file format has changed since 4.3BSD.
+The following awk script can be used to convert your old-style password
+file into a new style password file.
+The additional fields
+.Dq class ,
+.Dq change
+and
+.Dq expire
+are added, but are turned off by default.
+Class is currently not implemented, but change and expire are; to set them,
+use the current day in seconds from the epoch + whatever number of seconds
+of offset you want.
+.Bd -literal -offset indent
+BEGIN { FS = ":"}
+{ print $1 ":" $2 ":" $3 ":" $4 "::0:0:" $5 ":" $6 ":" $7 }
+.Ed
+.Sh HISTORY
+A
+.Nm
+file format appeared in
+.At v6 .
diff --git a/share/man/man5/phones.5 b/share/man/man5/phones.5
new file mode 100644
index 0000000..53705df
--- /dev/null
+++ b/share/man/man5/phones.5
@@ -0,0 +1,76 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)phones.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt PHONES 5
+.Os BSD 4.2
+.Sh NAME
+.Nm phones
+.Nd remote host phone number data base
+.Sh DESCRIPTION
+The file
+.Pa /etc/phones
+contains the system-wide
+private phone numbers for the
+.Xr tip 1
+program. This file is normally unreadable, and so may contain
+privileged information. The format of the file is a series of lines
+of the form: <system-name>[\ \et]*<phone-number>. The system name is
+one of those defined in the
+.Xr remote 5
+file and the phone number is constructed from any sequence of
+characters terminated only by ``,'' or the end of the line.
+The ``='' and ``*'' characters are
+indicators to the auto call units to pause and wait for a second dial
+tone (when going through an exchange). The ``='' is required by the
+.Tn DF02-AC
+and the ``*'' is required by the
+.Tn BIZCOMP
+1030.
+.Pp
+Only one phone number per line is permitted. However, if more than
+one line in the file contains the same system name
+.Xr tip 1
+will attempt to dial each one in turn, until it establishes a connection.
+.Sh FILES
+.Bl -tag -width /etc/phones -compact
+.It Pa /etc/phones
+.El
+.Sh SEE ALSO
+.Xr tip 1 ,
+.Xr remote 5
+.Sh HISTORY
+The
+.Nm
+file appeared in
+.Bx 4.2 .
diff --git a/share/man/man5/printcap.5 b/share/man/man5/printcap.5
new file mode 100644
index 0000000..22d3100
--- /dev/null
+++ b/share/man/man5/printcap.5
@@ -0,0 +1,288 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)printcap.5 8.2 (Berkeley) 12/11/93
+.\"
+.Dd December 11, 1993
+.Dt PRINTCAP 5
+.Os BSD 4.2
+.Sh NAME
+.Nm printcap
+.Nd printer capability data base
+.Sh SYNOPSIS
+.Nm printcap
+.Sh DESCRIPTION
+The
+.Nm Printcap
+function
+is a simplified version of the
+.Xr termcap 5
+data base
+used to describe line printers. The spooling system accesses the
+.Nm printcap
+file every time it is used, allowing dynamic
+addition and deletion of printers. Each entry in the data base
+is used to describe one printer. This data base may not be
+substituted for, as is possible for
+.Xr termcap ,
+because it may allow accounting to be bypassed.
+.Pp
+The default printer is normally
+.Em lp ,
+though the environment variable
+.Ev PRINTER
+may be used to override this. Each spooling utility supports an option,
+.Fl P Ar printer ,
+to allow explicit naming of a destination printer.
+.Pp
+Refer to the
+.%T "4.3 BSD Line Printer Spooler Manual"
+for a complete discussion on how to setup the database for a given printer.
+.Sh CAPABILITIES
+Refer to
+.Xr termcap 5
+for a description of the file layout.
+.Bl -column Namexxx Typexx "/var/spool/lpdxxxxx"
+.Sy Name Type Description
+.It "af str" Ta Dv NULL Ta No "name of accounting file"
+.It "br num none if lp is a tty, set the baud rate"
+.Pf ( Xr ioctl 2
+call)
+.It "cf str" Ta Dv NULL Ta No "cifplot data filter"
+.It "df str" Ta Dv NULL Ta No "tex data filter"
+.Pf ( Tn DVI
+format)
+.It "fc num 0 if lp is a tty, clear flag bits"
+.Pq Pa sgtty.h
+.It "ff str" Ta So Li \ef Sc Ta No "string to send for a form feed"
+.It "fo bool false print a form feed when device is opened"
+.It "fs num 0 like `fc' but set bits"
+.It "gf str" Ta Dv NULL Ta No "graph data filter"
+.Pf ( Xr plot 3
+format
+.It "hl bool false print the burst header page last"
+.It "ic bool false driver supports (non standard) ioctl to indent printout"
+.It "if str" Ta Dv NULL Ta No "name of text filter which does accounting"
+.It "lf str" Ta Pa /dev/console Ta No "error logging file name"
+.It "lo str" Ta Pa lock Ta No "name of lock file"
+.It "lp str" Ta Pa /dev/lp Ta No "device name to open for output"
+.It "mx num 1000 maximum file size (in"
+.Dv BUFSIZ
+blocks), zero = unlimited
+.It "nd str" Ta Dv NULL Ta No "next directory for list of queues (unimplemented)"
+.It "nf str" Ta Dv NULL Ta No "ditroff data filter (device independent troff)"
+.It "of str" Ta Dv NULL Ta No "name of output filtering program"
+.It "pc num 200 price per foot or page in hundredths of cents"
+.It "pl num 66 page length (in lines)"
+.It "pw num 132 page width (in characters)"
+.It "px num 0 page width in pixels (horizontal)"
+.It "py num 0 page length in pixels (vertical)"
+.It "rf str" Ta Dv NULL Ta No "filter for printing"
+.Tn FORTRAN
+style text files
+.It "rg str" Ta Dv NULL Ta No "restricted group. Only members of group allowed access"
+.It "rm str" Ta Dv NULL Ta No "machine name for remote printer"
+.It "rp str ``lp'' remote printer name argument"
+.It "rs bool false restrict remote users to those with local accounts"
+.It "rw bool false open the printer device for reading and writing"
+.It "sb bool false short banner (one line only)"
+.It "sc bool false suppress multiple copies"
+.It "sd str" Ta Pa /var/spool/lpd Ta No "spool directory"
+.It "sf bool false suppress form feeds"
+.It "sh bool false suppress printing of burst page header"
+.It "st str" Ta Pa status Ta No "status file name"
+.It "tf str" Ta Dv NULL Ta No "troff data filter (cat phototypesetter)"
+.It "tr str" Ta Dv NULL Ta No "trailer string to print when queue empties"
+.It "vf str" Ta Dv NULL Ta No "raster image filter"
+.It "xc num 0 if lp is a tty, clear local mode bits"
+.Pq Xr tty 4
+.It "xs num 0 like `xc' but set bits"
+.El
+.Pp
+If the local line printer driver supports indentation, the daemon
+must understand how to invoke it.
+.Sh FILTERS
+The
+.Xr lpd 8
+daemon creates a pipeline of
+.Em filters
+to process files for various printer types.
+The filters selected depend on the flags passed to
+.Xr lpr 1 .
+The pipeline set up is:
+.Bd -literal -offset indent
+p pr | if regular text + pr(1)
+none if regular text
+c cf cifplot
+d df DVI (tex)
+g gf plot(3)
+n nf ditroff
+f rf Fortran
+t tf troff
+v vf raster image
+.Ed
+.Pp
+The
+.Sy if
+filter is invoked with arguments:
+.Bd -filled -offset indent
+.Cm if
+.Op Fl c
+.Fl w Ns Ar width
+.Fl l Ns Ar length
+.Fl i Ns Ar indent
+.Fl n Ar login
+.Fl h Ar host acct-file
+.Ed
+.Pp
+The
+.Fl c
+flag is passed only if the
+.Fl l
+flag (pass control characters literally)
+is specified to
+.Xr lpr .
+The
+.Ar Width
+function
+and
+.Ar length
+specify the page width and length
+(from
+.Cm pw
+and
+.Cm pl
+respectively) in characters.
+The
+.Fl n
+and
+.Fl h
+parameters specify the login name and host name of the owner
+of the job respectively.
+The
+.Ar Acct-file
+function
+is passed from the
+.Cm af
+.Nm printcap
+entry.
+.Pp
+If no
+.Cm if
+is specified,
+.Cm of
+is used instead,
+with the distinction that
+.Cm of
+is opened only once,
+while
+.Cm if
+is opened for every individual job.
+Thus,
+.Cm if
+is better suited to performing accounting.
+The
+.Cm of
+is only given the
+.Ar width
+and
+.Ar length
+flags.
+.Pp
+All other filters are called as:
+.Bd -filled -offset indent
+.Nm filter
+.Fl x Ns Ar width
+.Fl y Ns Ar length
+.Fl n Ar login
+.Fl h Ar host acct-file
+.Ed
+.Pp
+where
+.Ar width
+and
+.Ar length
+are represented in pixels,
+specified by the
+.Cm px
+and
+.Cm py
+entries respectively.
+.Pp
+All filters take
+.Em stdin
+as the file,
+.Em stdout
+as the printer,
+may log either to
+.Em stderr
+or using
+.Xr syslog 3 ,
+and must not ignore
+.Dv SIGINT .
+.Sh LOGGING
+Error messages generated by the line printer programs themselves
+(that is, the
+.Xr lp Ns *
+programs)
+are logged by
+.Xr syslog 3
+using the
+.Dv LPR
+facility.
+Messages printed on
+.Em stderr
+of one of the filters
+are sent to the corresponding
+.Cm lf
+file.
+The filters may, of course, use
+.Xr syslog
+themselves.
+.Pp
+Error messages sent to the console have a carriage return and a line
+feed appended to them, rather than just a line feed.
+.Sh SEE ALSO
+.Xr termcap 5 ,
+.Xr lpc 8 ,
+.Xr lpd 8 ,
+.Xr pac 8 ,
+.Xr lpr 1 ,
+.Xr lpq 1 ,
+.Xr lprm 1
+.Rs
+.%T "4.3 BSD Line Printer Spooler Manual"
+.Re
+.Sh HISTORY
+The
+.Nm
+file format appeared in
+.Bx 4.2 ..
diff --git a/share/man/man5/protocols.5 b/share/man/man5/protocols.5
new file mode 100644
index 0000000..8b31c8a
--- /dev/null
+++ b/share/man/man5/protocols.5
@@ -0,0 +1,77 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)protocols.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt PROTOCOLS 5
+.Os BSD 4.2
+.Sh NAME
+.Nm protocols
+.Nd protocol name data base
+.Sh DESCRIPTION
+The
+.Nm protocols
+file contains information regarding the known protocols used in the
+.Tn DARPA
+Internet. For each protocol a single line should be present
+with the following information:
+.Bd -unfilled -offset indent
+official protocol name
+protocol number
+aliases
+.Ed
+.Pp
+Items are separated by any number of blanks and/or
+tab characters. A ``#'' indicates the beginning of
+a comment; characters up to the end of the line are
+not interpreted by routines which search the file.
+.Pp
+Protocol names may contain any printable
+character other than a field delimiter, newline,
+or comment character.
+.Sh FILES
+.Bl -tag -width /etc/protocols -compact
+.It Pa /etc/protocols
+The
+.Nm protocols
+file resides in
+.Pa /etc .
+.El
+.Sh SEE ALSO
+.Xr getprotoent 3
+.Sh BUGS
+A name server should be used instead of a static file.
+.Sh HISTORY
+The
+.Nm
+file format appeared in
+.Bx 4.2 .
diff --git a/share/man/man5/remote.5 b/share/man/man5/remote.5
new file mode 100644
index 0000000..27c83f6
--- /dev/null
+++ b/share/man/man5/remote.5
@@ -0,0 +1,200 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)remote.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt REMOTE 5
+.Os BSD 4.2
+.Sh NAME
+.Nm remote
+.Nd remote host description file
+.Sh DESCRIPTION
+The systems known by
+.Xr tip 1
+and their attributes are stored in an
+.Tn ASCII
+file which
+is structured somewhat like the
+.Xr termcap 5
+file. Each line in the file provides a description for a single
+.Xr system .
+Fields are separated by a colon (``:'').
+Lines ending in a \e character with an immediately following newline are
+continued on the next line.
+.Pp
+The first entry is the name(s) of the host system. If there is more
+than one name for a system, the names are separated by vertical bars.
+After the name of the system comes the fields of the description. A
+field name followed by an `=' sign indicates a string value follows. A field
+name followed by a `#' sign indicates a following numeric value.
+.Pp
+Entries named ``tip*'' and ``cu*''
+are used as default entries by
+.Xr tip ,
+and the
+.Xr cu
+interface to
+.Xr tip ,
+as follows. When
+.Xr tip
+is invoked with only a phone number, it looks for an entry
+of the form ``tip300'', where 300 is the baud rate with
+which the connection is to be made. When the
+.Xr cu
+interface is used, entries of the form ``cu300'' are used.
+.Sh CAPABILITIES
+Capabilities are either strings (str), numbers (num), or boolean
+flags (bool). A string capability is specified by
+.Em capability Ns Ar = Ns Em value ;
+for example, ``dv=/dev/harris''. A numeric capability is specified by
+.Em capability Ns Ar # Ns Em value ;
+for example, ``xa#99''. A boolean capability is specified by simply listing
+the capability.
+.Bl -tag -width indent
+.It Cm \&at
+(str)
+Auto call unit type.
+.It Cm \&br
+(num)
+The baud rate used in establishing
+a connection to the remote host.
+This is a decimal number.
+The default baud rate is 300 baud.
+.It Cm \&cm
+(str)
+An initial connection message to be sent
+to the remote host. For example, if a
+host is reached through port selector, this
+might be set to the appropriate sequence
+required to switch to the host.
+.It Cm \&cu
+(str)
+Call unit if making a phone call.
+Default is the same as the `dv' field.
+.It Cm \&di
+(str)
+Disconnect message sent to the host when a
+disconnect is requested by the user.
+.It Cm \&du
+(bool)
+This host is on a dial-up line.
+.It Cm \&dv
+(str)
+.Tn UNIX
+device(s) to open to establish a connection.
+If this file refers to a terminal line,
+.Xr tip 1
+attempts to perform an exclusive open on the device to insure only
+one user at a time has access to the port.
+.It Cm \&el
+(str)
+Characters marking an end-of-line.
+The default is
+.Dv NULL .
+`~' escapes are only
+recognized by
+.Xr tip
+after one of the characters in `el',
+or after a carriage-return.
+.It Cm \&fs
+(str)
+Frame size for transfers.
+The default frame size is equal to
+.Dv BUFSIZ .
+.It Cm \&hd
+(bool)
+The host uses half-duplex communication, local
+echo should be performed.
+.It Cm \&ie
+(str)
+Input end-of-file marks.
+The default is
+.Dv NULL .
+.It Cm \&oe
+(str)
+Output end-of-file string.
+The default is
+.Dv NULL .
+When
+.Xr tip
+is transferring a file, this
+string is sent at end-of-file.
+.It Cm \&pa
+(str)
+The type of parity to use when sending data
+to the host. This may be one of ``even'',
+``odd'', ``none'', ``zero'' (always set bit 8 to zero),
+``one'' (always set bit 8 to 1). The default
+is even parity.
+.It Cm \&pn
+(str)
+Telephone number(s) for this host.
+If the telephone number field contains
+an @ sign,
+.Xr tip
+searches the file
+.Pa /etc/phones
+file for a list of telephone numbers;
+(See
+.Xr phones 5 . )
+.It Cm \&tc
+(str)
+Indicates that the list of capabilities is continued
+in the named description. This is used
+primarily to share common capability information.
+.El
+.Pp
+Here is a short example showing the use of the capability continuation
+feature:
+.Bd -literal
+UNIX-1200:\e
+:dv=/dev/cau0:el=^D^U^C^S^Q^O@:du:at=ventel:ie=#$%:oe=^D:br#1200:
+arpavax|ax:\e
+:pn=7654321%:tc=UNIX-1200
+.Ed
+.Sh FILES
+.Bl -tag -width /etc/remote -compact
+.It Pa /etc/remote
+The
+.Nm remote
+host description file
+resides in
+.Pa /etc .
+.El
+.Sh SEE ALSO
+.Xr tip 1 ,
+.Xr phones 5
+.Sh HISTORY
+The
+.Nm
+file format appeared in
+.Bx 4.2 .
diff --git a/share/man/man5/resolver.5 b/share/man/man5/resolver.5
new file mode 100644
index 0000000..0358be6
--- /dev/null
+++ b/share/man/man5/resolver.5
@@ -0,0 +1,142 @@
+.\" Copyright (c) 1986, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)resolver.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt RESOLVER 5
+.Os BSD 4
+.Sh NAME
+.Nm resolver
+.Nd resolver configuration file
+.Sh SYNOPSIS
+.Nm resolv.conf
+.Sh DESCRIPTION
+The
+.Xr resolver 3
+is a set of routines in the C library
+which provide access to the Internet Domain Name System.
+The resolver configuration file contains information that is read
+by the resolver routines the first time they are invoked by a process.
+The file is designed to be human readable and contains a list of
+keywords with values that provide various types of resolver information.
+.Pp
+On a normally configured system this file should not be necessary.
+The only name server to be queried will be on the local machine,
+the domain name is determined from the host name,
+and the domain search path is constructed from the domain name.
+.Pp
+The different configuration options are:
+.Bl -tag -width nameserver
+.It Sy nameserver
+Internet address (in dot notation) of a name server
+that the resolver should query.
+Up to
+.Dv MAXNS
+(currently 3) name servers may be listed,
+one per keyword.
+If there are multiple servers,
+the resolver library queries them in the order listed.
+If no
+.Sy nameserver
+entries are present,
+the default is to use the name server on the local machine.
+(The algorithm used is to try a name server, and if the query times out,
+try the next, until out of name servers,
+then repeat trying all the name servers
+until a maximum number of retries are made).
+.It Sy domain
+Local domain name.
+Most queries for names within this domain can use short names
+relative to the local domain.
+If no
+.Sy domain
+entry is present, the domain is determined
+from the local host name returned by
+.Xr gethostname 2 ;
+the domain part is taken to be everything after the first `.'.
+Finally, if the host name does not contain a domain part, the root
+domain is assumed.
+.It Sy search
+Search list for host-name lookup.
+The search list is normally determined from the local domain name;
+by default, it begins with the local domain name, then successive
+parent domains that have at least two components in their names.
+This may be changed by listing the desired domain search path
+following the
+.Sy search
+keyword with spaces or tabs separating
+the names.
+Most resolver queries will be attempted using each component
+of the search path in turn until a match is found.
+Note that this process may be slow and will generate a lot of network
+traffic if the servers for the listed domains are not local,
+and that queries will time out if no server is available
+for one of the domains.
+.Pp
+The search list is currently limited to six domains
+with a total of 256 characters.
+.El
+.Pp
+The
+.Sy domain
+and
+.Sy search
+keywords are mutually exclusive.
+If more than one instance of these keywords is present,
+the last instance will override.
+.Pp
+The keyword and value must appear on a single line, and the keyword
+(e.g.
+.Sy nameserver )
+must start the line. The value follows
+the keyword, separated by white space.
+.Sh FILES
+.Bl -tag -width /etc/resolv.conf -compact
+.It Pa /etc/resolv.conf
+The file
+.Nm resolv.conf
+resides in
+.Pa /etc .
+.El
+.Sh SEE ALSO
+.Xr gethostbyname 3 ,
+.Xr resolver 3 ,
+.Xr hostname 7 ,
+.Xr named 8
+.Rs
+.%T "Name Server Operations Guide for BIND"
+.Re
+.Sh HISTORY
+The
+.Nm resolv.conf
+file format appeared in
+.Bx 4.3 .
diff --git a/share/man/man5/services.5 b/share/man/man5/services.5
new file mode 100644
index 0000000..80e03a8
--- /dev/null
+++ b/share/man/man5/services.5
@@ -0,0 +1,85 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)services.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt SERVICES 5
+.Os BSD 4.2
+.Sh NAME
+.Nm services
+.Nd service name data base
+.Sh DESCRIPTION
+The
+.Nm services
+file contains information regarding
+the known services available in the
+.Tn DARPA
+Internet.
+For each service a single line should be present
+with the following information:
+.Bd -unfilled -offset indent
+official service name
+port number
+protocol name
+aliases
+.Ed
+.Pp
+Items are separated by any number of blanks and/or
+tab characters. The port number and protocol name
+are considered a single
+.Em item ;
+a ``/'' is used to
+separate the port and protocol (e.g. ``512/tcp'').
+A ``#'' indicates the beginning of
+a comment; subsequent characters up to the end of the line are
+not interpreted by the routines which search the file.
+.Pp
+Service names may contain any printable
+character other than a field delimiter, newline,
+or comment character.
+.Sh FILES
+.Bl -tag -width /etc/services -compact
+.It Pa /etc/services
+The
+.Nm services
+file resides in
+.Pa /etc .
+.El
+.Sh SEE ALSO
+.Xr getservent 3
+.Sh BUGS
+A name server should be used instead of a static file.
+.Sh HISTORY
+The
+.Nm
+file format appeared in
+.Bx 4.2 .
diff --git a/share/man/man5/shells.5 b/share/man/man5/shells.5
new file mode 100644
index 0000000..649b8a3
--- /dev/null
+++ b/share/man/man5/shells.5
@@ -0,0 +1,65 @@
+.\" Copyright (c) 1986, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)shells.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt SHELLS 5
+.Os BSD 4.2
+.Sh NAME
+.Nm shells
+.Nd shell database
+.Sh DESCRIPTION
+The
+.Nm shells
+file contains a list of the shells on the system.
+For each shell a single line should be present, consisting of the
+shell's path, relative to root.
+.Pp
+A hash mark (``#'') indicates the beginning of a comment; subsequent
+characters up to the end of the line are not interpreted by the
+routines which search the file.
+Blank lines are also ignored.
+.Sh FILES
+.Bl -tag -width /etc/shells -compact
+.It Pa /etc/shells
+The
+.Nm shells
+file resides in
+.Pa /etc .
+.El
+.Sh SEE ALSO
+.Xr getusershell 3
+.Sh HISTORY
+The
+.Nm
+file format appeared in
+.Bx 4.3 tahoe .
diff --git a/share/man/man5/stab.5 b/share/man/man5/stab.5
new file mode 100644
index 0000000..7f7cef8
--- /dev/null
+++ b/share/man/man5/stab.5
@@ -0,0 +1,222 @@
+.\" Copyright (c) 1980, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)stab.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt STAB 5
+.Os BSD 4
+.Sh NAME
+.Nm stab
+.Nd symbol table types
+.Sh SYNOPSIS
+.Fd #include <stab.h>
+.Sh DESCRIPTION
+The file
+.Aq Pa stab.h
+defines some of the symbol table
+.Fa n_type
+field values for a.out files.
+These are the types for permanent symbols (i.e. not local labels, etc.)
+used by the old debugger
+.Em sdb
+and the Berkeley Pascal compiler
+.Xr pc 1 .
+Symbol table entries can be produced by the
+.Pa .stabs
+assembler directive.
+This allows one to specify a double-quote delimited name, a symbol type,
+one char and one short of information about the symbol, and an unsigned
+long (usually an address).
+To avoid having to produce an explicit label for the address field,
+the
+.Pa .stabd
+directive can be used to implicitly address the current location.
+If no name is needed, symbol table entries can be generated using the
+.Pa .stabn
+directive.
+The loader promises to preserve the order of symbol table entries produced
+by
+.Pa .stab
+directives.
+As described in
+.Xr a.out 5 ,
+an element of the symbol table
+consists of the following structure:
+.Bd -literal
+/*
+* Format of a symbol table entry.
+*/
+
+struct nlist {
+ union {
+ char *n_name; /* for use when in-core */
+ long n_strx; /* index into file string table */
+ } n_un;
+ unsigned char n_type; /* type flag */
+ char n_other; /* unused */
+ short n_desc; /* see struct desc, below */
+ unsigned n_value; /* address or offset or line */
+};
+.Ed
+.Pp
+The low bits of the
+.Fa n_type
+field are used to place a symbol into
+at most one segment, according to
+the following masks, defined in
+.Aq Pa a.out.h .
+A symbol can be in none of these segments by having none of these segment
+bits set.
+.Bd -literal
+/*
+* Simple values for n_type.
+*/
+
+#define N_UNDF 0x0 /* undefined */
+#define N_ABS 0x2 /* absolute */
+#define N_TEXT 0x4 /* text */
+#define N_DATA 0x6 /* data */
+#define N_BSS 0x8 /* bss */
+
+#define N_EXT 01 /* external bit, or'ed in */
+.Ed
+.Pp
+The
+.Fa n_value
+field of a symbol is relocated by the linker,
+.Xr ld 1
+as an address within the appropriate segment.
+.Fa N_value
+fields of symbols not in any segment are unchanged by the linker.
+In addition, the linker will discard certain symbols, according to rules
+of its own, unless the
+.Fa n_type
+field has one of the following bits set:
+.Bd -literal
+/*
+* Other permanent symbol table entries have some of the N_STAB bits set.
+* These are given in <stab.h>
+*/
+
+#define N_STAB 0xe0 /* if any of these bits set, don't discard */
+.Ed
+.Pp
+This allows up to 112 (7 \(** 16) symbol types, split between the various
+segments.
+Some of these have already been claimed.
+The old symbolic debugger,
+.Em sdb ,
+uses the following n_type values:
+.Bd -literal
+#define N_GSYM 0x20 /* global symbol: name,,0,type,0 */
+#define N_FNAME 0x22 /* procedure name (f77 kludge): name,,0 */
+#define N_FUN 0x24 /* procedure: name,,0,linenumber,address */
+#define N_STSYM 0x26 /* static symbol: name,,0,type,address */
+#define N_LCSYM 0x28 /* .lcomm symbol: name,,0,type,address */
+#define N_RSYM 0x40 /* register sym: name,,0,type,register */
+#define N_SLINE 0x44 /* src line: 0,,0,linenumber,address */
+#define N_SSYM 0x60 /* structure elt: name,,0,type,struct_offset */
+#define N_SO 0x64 /* source file name: name,,0,0,address */
+#define N_LSYM 0x80 /* local sym: name,,0,type,offset */
+#define N_SOL 0x84 /* #included file name: name,,0,0,address */
+#define N_PSYM 0xa0 /* parameter: name,,0,type,offset */
+#define N_ENTRY 0xa4 /* alternate entry: name,linenumber,address */
+#define N_LBRAC 0xc0 /* left bracket: 0,,0,nesting level,address */
+#define N_RBRAC 0xe0 /* right bracket: 0,,0,nesting level,address */
+#define N_BCOMM 0xe2 /* begin common: name,, */
+#define N_ECOMM 0xe4 /* end common: name,, */
+#define N_ECOML 0xe8 /* end common (local name): ,,address */
+#define N_LENG 0xfe /* second stab entry with length information */
+.Ed
+.Pp
+where the comments give
+.Em sdb
+conventional use for
+.Pa .stab
+.Fa s
+and the
+.Fa n_name ,
+.Fa n_other ,
+.Fa n_desc ,
+and
+.Fa n_value
+fields
+of the given
+.Fa n_type .
+.Em Sdb
+uses the
+.Fa n_desc
+field to hold a type specifier in the form used
+by the Portable C Compiler,
+.Xr cc 1 ;
+see the header file
+.Pa pcc.h
+for details on the format of these type values.
+.Pp
+The Berkeley Pascal compiler,
+.Xr pc 1 ,
+uses the following
+.Fa n_type
+value:
+.Bd -literal
+#define N_PC 0x30 /* global pascal symbol: name,,0,subtype,line */
+.Ed
+.Pp
+and uses the following subtypes to do type checking across separately
+compiled files:
+.Bd -unfilled -offset indent
+1 source file name
+2 included file name
+3 global label
+4 global constant
+5 global type
+6 global variable
+7 global function
+8 global procedure
+9 external function
+10 external procedure
+11 library variable
+12 library routine
+.Ed
+.Sh SEE ALSO
+.Xr as 1 ,
+.Xr ld 1 ,
+.Xr dbx 1 ,
+.Xr a.out 5
+.Sh BUGS
+.Pp
+More basic types are needed.
+.Sh HISTORY
+The
+.Nm stab
+file appeared in
+.Bx 4.0 .
diff --git a/share/man/man5/types.5 b/share/man/man5/types.5
new file mode 100644
index 0000000..8a6b3bf
--- /dev/null
+++ b/share/man/man5/types.5
@@ -0,0 +1,147 @@
+.\" Copyright (c) 1980, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)types.5 8.1 (Berkeley) 6/5/93
+.\"
+.Dd June 5, 1993
+.Dt TYPES 5
+.Os BSD 4
+.Sh NAME
+.Nm types
+.Nd system data types
+.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Sh DESCRIPTION
+The file
+.Pa sys/types.h
+contains the defined data types used in the kernel (most are
+used through out the system).
+.Bd -literal
+#ifndef _TYPES_H_
+#define _TYPES_H_
+
+typedef short dev_t;
+#ifndef _POSIX_SOURCE
+ /* major part of a device */
+#define major(x) ((int)(((unsigned)(x)>>8)&0377))
+ /* minor part of a device */
+#define minor(x) ((int)((x)&0377))
+ /* make a device number */
+#define makedev(x,y) ((dev_t)(((x)<<8) | (y)))
+#endif
+
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+typedef unsigned short ushort; /* Sys V compatibility */
+
+#include <machine/ansi.h>
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#include <machine/types.h>
+#endif
+
+#ifdef _CLOCK_T_
+typedef _CLOCK_T_ clock_t;
+#undef _CLOCK_T_
+#endif
+
+#ifdef _SIZE_T_
+typedef _SIZE_T_ size_t;
+#undef _SIZE_T_
+#endif
+
+#ifdef _TIME_T_
+typedef _TIME_T_ time_t;
+#undef _TIME_T_
+#endif
+
+#ifndef _POSIX_SOURCE
+typedef struct _uquad { unsigned long val[2]; } u_quad;
+typedef struct _quad { long val[2]; } quad;
+#endif
+typedef long * qaddr_t; /* should be typedef quad * qaddr_t; */
+
+typedef long daddr_t;
+typedef char * caddr_t;
+typedef u_long ino_t;
+typedef long swblk_t;
+typedef long segsz_t;
+typedef long off_t;
+typedef u_short uid_t;
+typedef u_short gid_t;
+typedef short pid_t;
+typedef u_short nlink_t;
+typedef u_short mode_t;
+typedef u_long fixpt_t;
+
+#ifndef _POSIX_SOURCE
+#define NBBY 8 /* number of bits in a byte */
+
+/*
+ * Select uses bit masks of file descriptors in longs. These macros
+ * manipulate such bit fields (the filesystem macros use chars).
+ * FD_SETSIZE may be defined by the user, but the default here should
+ * be >= NOFILE (param.h).
+ */
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 256
+#endif
+
+typedef long fd_mask;
+#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
+
+#ifndef howmany
+#define howmany(x, y) (((x)+((y)-1))/(y))
+#endif
+
+typedef struct fd_set {
+ fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
+} fd_set;
+
+#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
+#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
+#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
+#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
+
+#endif /* !_POSIX_SOURCE */
+#endif /* !_TYPES_H_ */
+.Ed
+.Sh SEE ALSO
+.Xr fs 5 ,
+.Xr time 3 ,
+.Xr lseek 2 ,
+.Xr adb 1
+.Sh HISTORY
+A
+.Nm
+file appeared in
+.At v7 .
diff --git a/share/man/man5/utmp.5 b/share/man/man5/utmp.5
new file mode 100644
index 0000000..a3ac4b0
--- /dev/null
+++ b/share/man/man5/utmp.5
@@ -0,0 +1,218 @@
+.\" Copyright (c) 1980, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)utmp.5 8.2 (Berkeley) 3/17/94
+.\"
+.Dd March 17, 1994
+.Dt UTMP 5
+.Os BSD 4
+.Sh NAME
+.Nm utmp ,
+.Nm wtmp ,
+.Nm lastlog
+.Nd login records
+.Sh SYNOPSIS
+.Fd #include <utmp.h>
+.Sh DESCRIPTION
+The file
+.Aq Pa utmp.h
+declares the structures used to record information about current
+users in the file
+.Nm utmp ,
+logins and logouts in the file
+.Nm wtmp ,
+and last logins in the file
+.Nm lastlog .
+The time stamps of date changes, shutdowns and reboots are also logged in
+the
+.Nm wtmp
+file.
+.Pp
+These files can grow rapidly on busy systems, daily or weekly rotation
+is recommended.
+If any of these files do not exist, it is not created.
+These
+files must be created manually and are normally maintained in either the script
+.Pa /etc/daily
+or the script
+.Pa /etc/weekly .
+(See
+.Xr cron 8 . )
+.Bd -literal -offset indent
+#define _PATH_UTMP "/var/run/utmp"
+#define _PATH_WTMP "/var/log/wtmp"
+#define _PATH_LASTLOG "/var/log/lastlog"
+
+#define UT_NAMESIZE 8
+#define UT_LINESIZE 8
+#define UT_HOSTSIZE 16
+
+struct lastlog {
+ time_t ll_time;
+ char ll_line[UT_LINESIZE];
+ char ll_host[UT_HOSTSIZE];
+};
+
+struct utmp {
+ char ut_line[UT_LINESIZE];
+ char ut_name[UT_NAMESIZE];
+ char ut_host[UT_HOSTSIZE];
+ long ut_time;
+};
+.Ed
+.Pp
+Each time a user logs in, the
+.Xr login
+program looks up the user's
+.Tn UID
+in the file
+.Nm lastlog.
+If it is found, the timestamp of the last time the user logged
+in, the terminal line and the hostname
+are written to the standard output. (Providing the login is not
+.Em quiet ,
+see
+.Xr login 1 . )
+The
+.Xr login
+program then records the new login time in the file
+.Nm lastlog .
+.Pp
+After the new
+.Fa lastlog
+record is written ,
+.\" the
+.\" .Xr libutil 3
+.\" routine
+the file
+.Nm utmp
+is opened and the
+.Fa utmp
+record for the user inserted.
+This record remains there until
+the user logs out at which time it is deleted.
+The
+.Nm utmp
+file is used by the programs
+.Xr rwho 1 ,
+.Xr users 1 ,
+.Xr w 1 ,
+and
+.Xr who 1 .
+.Pp
+Next, the
+.Xr login
+program opens the file
+.Nm wtmp ,
+and appends the user's
+.Fa utmp
+record.
+The same
+.Fa utmp
+record, with an updated time stamp is later appended
+to the file when the user logs out. (See
+.Xr init 8 . )
+The
+.Nm wtmp
+file is used by the programs
+.Xr last 1
+and
+.Xr ac 8 .
+.Pp
+In the event of a date change, a shutdown or reboot, the
+following items are logged in the
+.Nm wtmp
+file.
+.Pp
+.Bl -tag -width shutdownxx -compact
+.It Li reboot
+.It Li shutdown
+A system reboot or shutdown has been initiated.
+The character
+.Ql \&~
+is placed in the field
+.Fa ut_line ,
+and
+.Li reboot
+or
+.Li shutdown
+in the field
+.Fa ut_name .
+(See
+.Xr shutdown 8
+and
+.Xr reboot 8 . )
+.Pp
+.It Li date
+The system time has been manually or automatically updated.
+(See
+.Xr date 1 . )
+The command name
+.Xr date
+is recorded in the field
+.Fa ut_name .
+In the field
+.Fa ut_line ,
+the character
+.Ql \\*(Ba
+indicates the time prior to the change, and the character
+.Ql \&{
+indicates the new time.
+.El
+.Sh FILES
+.Bl -tag -width /var/log/lastlog -compact
+.It Pa /var/run/utmp
+The
+.Nm utmp file.
+.It Pa /var/log/wtmp
+The
+.Nm wtmp file.
+.It Pa /var/log/lastlog
+The
+.Nm lastlog file.
+.El
+.Sh SEE ALSO
+.Xr last 1 ,
+.Xr login 1 ,
+.Xr who 1 ,
+.Xr ac 8 ,
+.Xr init 8
+.Sh HISTORY
+A
+.Nm utmp
+and
+.Nm wtmp
+file format appeared in
+.At v6 .
+The
+.Nm lastlog
+file format appeared in
+.Bx 3.0 .
OpenPOWER on IntegriCloud