summaryrefslogtreecommitdiff
path: root/usr.bin/last/last.1
diff options
context:
space:
mode:
authorjdm <jdm@cvs.openbsd.org>1997-07-20 07:54:10 +0000
committerjdm <jdm@cvs.openbsd.org>1997-07-20 07:54:10 +0000
commit6b567c0a508dde05ee51f0129f8510e8d1574ad8 (patch)
tree02bfb85ecc68ef1a267b4583fb74a14c035ef247 /usr.bin/last/last.1
parent92bdb2a19e7e80aac648744b28bb70d8df84fd6e (diff)
add -d flag for reporting active sessions at a specified point in time.
Diffstat (limited to 'usr.bin/last/last.1')
-rw-r--r--usr.bin/last/last.166
1 files changed, 62 insertions, 4 deletions
diff --git a/usr.bin/last/last.1 b/usr.bin/last/last.1
index eff134f1885..07708ea3a9c 100644
--- a/usr.bin/last/last.1
+++ b/usr.bin/last/last.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: last.1,v 1.2 1996/06/26 05:34:51 deraadt Exp $
+.\" $OpenBSD: last.1,v 1.3 1997/07/20 07:54:08 jdm Exp $
.\" $NetBSD: last.1,v 1.3 1994/12/21 22:41:23 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
@@ -46,14 +46,17 @@
.Op Fl f Ar file
.Op Fl h Ar host
.Op Fl t Ar tty
+.Op Fl d Ar [[CC]YY][MMDD]hhmm[.SS]
.Op user ...
.Sh DESCRIPTION
.Nm Last
-will list the sessions of specified
+will either (1) list the sessions of specified
.Ar users ,
.Ar ttys ,
and
-.Ar hosts ,
+.Ar hosts ,
+in reverse time order,
+or (2) list the users logged in at a specified snapshot date & time
in reverse time order. Each line of output contains
the user name, the tty from which the session was conducted, any
hostname, the start and stop times for the session, and the duration
@@ -84,10 +87,65 @@ equivalent to
.It Fl h Ar host
.Ar Host
names may be names or internet numbers.
+.It Fl d Ar date
+Specify the snapshot date & time.
+All users logged in at the snapshot date & time will
+be reported.
+This may be used with the
+.Ar -f file
+option to derive the results from stored wtmp files.
+When this argument is provided, all other options except for
+.Ar -f file
+and
+.Ar -n
+are ignored.
+The argument should be in the form
+.Dq [[CC]YY][MMDD]hhmm[.SS]
+where each pair of letters represents the following:
+.Pp
+.Bl -tag -width Ds -compact -offset indent
+.It Ar CC
+The first two digits of the year (the century).
+.It Ar YY
+The second two digits of the year.
+If
+.Dq YY
+is specified, but
+.Dq CC
+is not, a value for
+.Dq YY
+between 69 and 99 results in a
+.Dq YY
+value of 19.
+Otherwise, a
+.Dq YY
+value of 20 is used.
+.It Ar MM
+The month of the year, from 1 to 12.
+.It Ar DD
+the day of the month, from 1 to 31.
+.It Ar hh
+The hour of the day, from 0 to 23.
+.It Ar mm
+The minute of the hour, from 0 to 59.
+.It Ar SS
+The second of the minute, from 0 to 61.
+.El
+.Pp
+If the
+.Dq CC
+and
+.Dq YY
+letter pairs are not specified, the values default to the current
+year.
+If the
+.Dq SS
+letter pair is not specified, the value defaults to 0.
.El
.Pp
If
-multiple arguments are given, the information which applies to any of the
+multiple arguments are given, and a snapshot time is not specified, the
+information which applies to any of the
arguments is printed, e.g.,
.Dq Li "last root -t console"
would list all of