diff options
author | 2006-10-27 07:16:25 +0000 | |
---|---|---|
committer | 2006-10-27 07:16:25 +0000 | |
commit | ab2737207c157d29be79bb362de6f53ae675dc9a (patch) | |
tree | 4d70fe8ad04ad9ebb0b4dd9dd9678a681e5d1b7e | |
parent | regen (diff) | |
download | wireguard-openbsd-ab2737207c157d29be79bb362de6f53ae675dc9a.tar.xz wireguard-openbsd-ab2737207c157d29be79bb362de6f53ae675dc9a.zip |
- simplify and sort synopsis
- sort options
- some minor text tweaks
- sync usage()
-rw-r--r-- | usr.bin/last/last.1 | 71 | ||||
-rw-r--r-- | usr.bin/last/last.c | 8 |
2 files changed, 39 insertions, 40 deletions
diff --git a/usr.bin/last/last.1 b/usr.bin/last/last.1 index 164835407a6..ac5576820e2 100644 --- a/usr.bin/last/last.1 +++ b/usr.bin/last/last.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: last.1,v 1.21 2004/06/16 22:30:07 millert Exp $ +.\" $OpenBSD: last.1,v 1.22 2006/10/27 07:16:25 jmc Exp $ .\" $NetBSD: last.1,v 1.3 1994/12/21 22:41:23 jtc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -39,23 +39,22 @@ .Sh SYNOPSIS .Nm last .Op Fl csT -.Op Fl Ns Ar number +.Op Fl d Ar date .Op Fl f Ar file .Op Fl h Ar host .Op Fl n Ar number .Op Fl t Ar tty -.Op Fl d Ar [[[CC]YY]MMDD]hhmm[.SS] .Op Ar user ... .Sh DESCRIPTION The .Nm -utility will either (1) list the sessions of specified +utility will either list the sessions of specified .Ar users , .Ar ttys , and .Ar hosts , in reverse time order, -or (2) list the users logged in at a specified snapshot date & time +or list the users logged in at a specified snapshot date and time in reverse time order. Each line of output contains the user name, the tty from which the session was conducted, any @@ -68,40 +67,11 @@ will so indicate. .Pp The options are as follows: .Bl -tag -width "-n number" -.It Fl Ns Ar number -Same as the -.Fl n -option (deprecated). .It Fl c Calculates the total time displayed and prints it after the output. -.It Fl f Ar file -.Nm -reads the file -.Ar file -instead of the default, -.Pa /var/log/wtmp . -.It Fl n Ar number -Limits the report to -.Ar number -lines. -.It Fl s -Display time values in seconds since the epoch, instead of formatted dates. -.It Fl t Ar tty -Specify the -.Ar tty . -tty names may be given fully or abbreviated, for example, -.Ic last -t 03 -is -equivalent to -.Ic last -t tty03 . -.It Fl h Ar host -.Ar host -names may be names or internet numbers. -.It Fl T -Display better time information, including seconds. .It Fl d Ar date -Specify the snapshot date & time. -All users logged in at the snapshot date & time will +Specify the snapshot date and time. +All users logged in at the snapshot date and time will be reported. This may be used with the .Fl f @@ -153,6 +123,35 @@ year. If the .Dq SS letter pair is not specified, the value defaults to 0. +.It Fl f Ar file +.Nm +reads the file +.Ar file +instead of the default, +.Pa /var/log/wtmp . +.It Fl h Ar host +.Ar host +names may be names or internet numbers. +.It Fl n Ar number +Limits the report to +.Ar number +lines. +The format +.Fl Ns Ar number +is also supported, +but is deprecated. +.It Fl s +Display time values in seconds since the epoch, instead of formatted dates. +.It Fl T +Display better time information, including seconds. +.It Fl t Ar tty +Specify the +.Ar tty . +tty names may be given fully or abbreviated, for example, +.Ic last -t 03 +is +equivalent to +.Ic last -t tty03 . .El .Pp If diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index bac17e23b0c..4d6157d6930 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -1,4 +1,4 @@ -/* $OpenBSD: last.c,v 1.33 2005/11/14 15:38:05 deraadt Exp $ */ +/* $OpenBSD: last.c,v 1.34 2006/10/27 07:16:25 jmc Exp $ */ /* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */ /* @@ -40,7 +40,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)last.c 8.2 (Berkeley) 4/2/94"; #endif -static char rcsid[] = "$OpenBSD: last.c,v 1.33 2005/11/14 15:38:05 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: last.c,v 1.34 2006/10/27 07:16:25 jmc Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -646,7 +646,7 @@ usage(void) extern char *__progname; fprintf(stderr, - "usage: %s [-#] [-csT] [-f file] [-n #] [-t tty] [-h host]" - " [-d [[[CC]YY]MMDD]hhmm[.SS]] [user ...]\n", __progname); + "usage: %s [-csT] [-d date] [-f file] [-h host]" + " [-n number] [-t tty] [user ...]\n", __progname); exit(1); } |