diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 1999-10-18 01:46:37 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 1999-10-18 01:46:37 +0000 |
commit | f1e627667992da0ad5558adb388db52b78fbf187 (patch) | |
tree | a4b2d9e198a4bd78971b928e6a22d16c9a122471 | |
parent | b28afe032a878294626a2b8d7548b986d73ac235 (diff) |
Add a help(1) man page -- help for new users and administrators.
-rw-r--r-- | usr.bin/man/Makefile | 4 | ||||
-rw-r--r-- | usr.bin/man/help.1 | 151 | ||||
-rw-r--r-- | usr.bin/man/man.c | 6 |
3 files changed, 156 insertions, 5 deletions
diff --git a/usr.bin/man/Makefile b/usr.bin/man/Makefile index 9faaa9fabb0..d7dc2e3fe22 100644 --- a/usr.bin/man/Makefile +++ b/usr.bin/man/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.4 1998/09/14 05:44:11 deraadt Exp $ +# $OpenBSD: Makefile,v 1.5 1999/10/18 01:46:36 aaron Exp $ PROG= man SRCS= config.c man.c -MAN= man.1 man.conf.5 +MAN= man.1 man.conf.5 help.1 LINKS= ${BINDIR}/man ${BINDIR}/help diff --git a/usr.bin/man/help.1 b/usr.bin/man/help.1 new file mode 100644 index 00000000000..4ff7da43430 --- /dev/null +++ b/usr.bin/man/help.1 @@ -0,0 +1,151 @@ +.\" $OpenBSD: help.1,v 1.1 1999/10/18 01:46:36 aaron Exp $ +.Dd October 17, 1999 +.Dt HELP 1 +.Os +.Sh NAME +.Nm help +.Nd help for new users and administrators +.Sh DESCRIPTION +This document is meant familiarize new users and system administrators with +.Ox +and, if necessary, +.Ux +in general. +.Pp +Firstly, a wealth of information is contained within the system manual pages. +In +.Ux , +the +.Xr man 1 +command is used to view them. +Type +.Ic man man +for instructions on how to use it properly. +Pay especially close attention to the +.Fl k +option. +.Pp +Other +.Ox +references include the FAQ (Frequently Asked Questions) located at +.Li http://www.openbsd.org/faq , +which is mostly intended for administrators and assumes the reader possesses +a working knowledge of +.Ux . +There are also mailing lists in place where questions are fielded by +.Ox +developers and other users; see +.Li http://www.openbsd.org/mail.html . +.Pp +System administrators should have already read the +.Xr afterboot 8 +man page which explains a variety of tasks that are typically performed +after the first system boot. +When configuring any aspect of the system, first consider any possible security +implications your changes may have. +.Ss The Unix shell +After logging in, some system messages are typically displayed, and then the +user is able to enter commands to be processed by the shell program. +The shell is a command-line interpreter that reads user input (normally from +a terminal) and executes commands. +There are many different shells available; +.Ox +ships with +.Xr csh 1 , +.Xr ksh 1 , +and +.Xr sh 1 . +Each user's shell is indicated by the last field of their corresponding entry +in the system password file +.Pf ( Pa /etc/passwd ) . +.Ss Basic Unix commands +.Bl -tag -width logout +.It Cm man +Interface to the system manual pages. +For any of the commands listed below, type +.Ic man <command> +for detailed information on what it does and how to use it. +.It Cm pwd +Print working directory. +Files are organized in a hierarchy (see +.Xr hier 7 ) +called a tree. +This command will indicate in which directory you are currently located. +.It Cm cd +Change working directory. +Use this command to navigate throughout the file hierarchy. +For example, type +.Ic cd / +to change the working directory to the root. +.It Cm ls +List directory contents. +Type +.Ic ls -l +for a detailed listing. +.It Cm cat +Although it has many more uses, +.Ic cat Ar filename +will print the contents of a plain-text file to the screen. +.It Cm mkdir +Make a directory. +For example, +.Ic mkdir myfiles . +.It Cm rmdir +Remove a directory. +.It Cm rm +Remove files. +Files are generally only removable by their owners. +See the +.Xr chmod 1 +command for information on file permissions. +.It Cm chmod +Change file modes, including permissions. +It is not immediately obvious how to use this command; please read its manual +page carefully, as proper file permissions, especially on system files, are +vital in maintaining security and integrity. +.It Cm cp +Copy files. +.It Cm mv +Move and rename files. +.It Cm ps +List active processes. +Most +.Ux Ns -based +operating systems, including +.Ox , +are multitasking, meaning many programs share system resources at the same +time. +A common usage is +.Ic ps -auxw , +which will display information about all active processes. +.It Cm kill +Kill processes. +Used mostly for terminating run-away/unresponsive programs, but also used to +signal programs for requesting certain operations (i.e., re-read their +configuration). +.It Cm date +Print the current system date and time. +.It Cm mail +Access mailbox. +.It Cm logout +Log out of the system. +.El +.Pp +When a command is entered, it is first checked to see if it is built-in to the +shell. +If not, the shell looks for the command in any directories contained within the +.Ev PATH +environment variable (see +.Xr environ 7 ) . +If the command is not found, an error message is printed. +Otherwise, the shell runs the command, passing it any arguments specified on +the command line. +.Sh SEE ALSO +.Xr man 1 , +.Xr whatis 1 , +.Xr whereis 1 , +.Xr afterboot 8 +.Sh HISTORY +This manual page was written by Aaron Campbell <aaron@openbsd.org> and first +appeared in +.Ox 2.6 . diff --git a/usr.bin/man/man.c b/usr.bin/man/man.c index ef7fd9770f8..738b6246556 100644 --- a/usr.bin/man/man.c +++ b/usr.bin/man/man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man.c,v 1.14 1999/07/28 01:17:56 deraadt Exp $ */ +/* $OpenBSD: man.c,v 1.15 1999/10/18 01:46:36 aaron Exp $ */ /* $NetBSD: man.c,v 1.7 1995/09/28 06:05:34 tls Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)man.c 8.17 (Berkeley) 1/31/95"; #else -static char rcsid[] = "$OpenBSD: man.c,v 1.14 1999/07/28 01:17:56 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: man.c,v 1.15 1999/10/18 01:46:36 aaron Exp $"; #endif #endif /* not lint */ @@ -100,7 +100,7 @@ main(argc, argv) if (argv[1] == NULL && strcmp(basename(__progname), "help") == 0) { static char *nargv[3]; nargv[0] = "man"; - nargv[1] = "man"; + nargv[1] = "help"; nargv[2] = NULL; argv = nargv; argc = 2; |