[BACK]Return to last.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / last

Annotation of src/usr.bin/last/last.1, Revision 1.3

1.3     ! jdm         1: .\"    $OpenBSD: last.1,v 1.2 1996/06/26 05:34:51 deraadt Exp $
1.1       deraadt     2: .\"    $NetBSD: last.1,v 1.3 1994/12/21 22:41:23 jtc Exp $
                      3: .\"
                      4: .\" Copyright (c) 1980, 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
                     15: .\" 3. All advertising materials mentioning features or use of this software
                     16: .\"    must display the following acknowledgement:
                     17: .\"    This product includes software developed by the University of
                     18: .\"    California, Berkeley and its contributors.
                     19: .\" 4. Neither the name of the University nor the names of its contributors
                     20: .\"    may be used to endorse or promote products derived from this software
                     21: .\"    without specific prior written permission.
                     22: .\"
                     23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     26: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     33: .\" SUCH DAMAGE.
                     34: .\"
                     35: .\"     @(#)last.1     8.1 (Berkeley) 6/6/93
                     36: .\"
                     37: .Dd June 6, 1993
                     38: .Dt LAST 1
                     39: .Os BSD 4
                     40: .Sh NAME
                     41: .Nm last
                     42: .Nd indicate last logins of users and ttys
                     43: .Sh SYNOPSIS
                     44: .Nm last
                     45: .Op Fl Ns Ar n
                     46: .Op Fl f Ar file
                     47: .Op Fl h Ar host
                     48: .Op Fl t Ar tty
1.3     ! jdm        49: .Op Fl d Ar [[CC]YY][MMDD]hhmm[.SS]
1.1       deraadt    50: .Op user ...
                     51: .Sh DESCRIPTION
                     52: .Nm Last
1.3     ! jdm        53: will either (1) list the sessions of specified
1.1       deraadt    54: .Ar users ,
                     55: .Ar ttys ,
                     56: and
1.3     ! jdm        57: .Ar hosts ,
        !            58: in reverse time order,
        !            59: or (2) list the users logged in at a specified snapshot date & time
1.1       deraadt    60: in reverse time order.  Each line of output contains
                     61: the user name, the tty from which the session was conducted, any
                     62: hostname, the start and stop times for the session, and the duration
                     63: of the session.  If the session is still continuing or was cut short by
                     64: a crash or shutdown,
                     65: .Nm last
                     66: will so indicate.
                     67: .Pp
                     68: .Bl -tag -width indent-two
                     69: .It Fl f Ar file
                     70: .Nm Last
                     71: reads the file
                     72: .Ar file
                     73: instead of the default,
                     74: .Pa /var/log/wtmp .
                     75: .It Fl Ar n
                     76: Limits the report to
                     77: .Ar n
                     78: lines.
                     79: .It Fl t Ar tty
                     80: Specify the
                     81: .Ar tty .
                     82: Tty names may be given fully or abbreviated, for example,
                     83: .Dq Li "last -t 03"
                     84: is
                     85: equivalent to
                     86: .Dq Li "last -t tty03" .
                     87: .It Fl h Ar host
                     88: .Ar Host
                     89: names may be names or internet numbers.
1.3     ! jdm        90: .It Fl d Ar date
        !            91: Specify the snapshot date & time.
        !            92: All users logged in at the snapshot date & time will
        !            93: be reported.
        !            94: This may be used with the
        !            95: .Ar -f file
        !            96: option to derive the results from stored wtmp files.
        !            97: When this argument is provided, all other options except for
        !            98: .Ar -f file
        !            99: and
        !           100: .Ar -n
        !           101: are ignored.
        !           102: The argument should be in the form
        !           103: .Dq [[CC]YY][MMDD]hhmm[.SS]
        !           104: where each pair of letters represents the following:
        !           105: .Pp
        !           106: .Bl -tag -width Ds -compact -offset indent
        !           107: .It Ar CC
        !           108: The first two digits of the year (the century).
        !           109: .It Ar YY
        !           110: The second two digits of the year.
        !           111: If
        !           112: .Dq YY
        !           113: is specified, but
        !           114: .Dq CC
        !           115: is not, a value for
        !           116: .Dq YY
        !           117: between 69 and 99 results in a
        !           118: .Dq YY
        !           119: value of 19.
        !           120: Otherwise, a
        !           121: .Dq YY
        !           122: value of 20 is used.
        !           123: .It Ar MM
        !           124: The month of the year, from 1 to 12.
        !           125: .It Ar DD
        !           126: the day of the month, from 1 to 31.
        !           127: .It Ar hh
        !           128: The hour of the day, from 0 to 23.
        !           129: .It Ar mm
        !           130: The minute of the hour, from 0 to 59.
        !           131: .It Ar SS
        !           132: The second of the minute, from 0 to 61.
        !           133: .El
        !           134: .Pp
        !           135: If the
        !           136: .Dq CC
        !           137: and
        !           138: .Dq YY
        !           139: letter pairs are not specified, the values default to the current
        !           140: year.
        !           141: If the
        !           142: .Dq SS
        !           143: letter pair is not specified, the value defaults to 0.
1.1       deraadt   144: .El
                    145: .Pp
                    146: If
1.3     ! jdm       147: multiple arguments are given, and a snapshot time is not specified, the
        !           148: information which applies to any of the
1.1       deraadt   149: arguments is printed, e.g.,
                    150: .Dq Li "last root -t console"
                    151: would list all of
                    152: .Dq Li root Ns 's
                    153: sessions as well as all sessions on the console terminal. If no
                    154: users, hostnames or terminals are specified,
                    155: .Nm last
                    156: prints a record of
                    157: all logins and logouts.
                    158: .Pp
                    159: The pseudo-user
                    160: .Ar reboot
                    161: logs in at reboots of the system, thus
                    162: .Dq Li last reboot
                    163: will give an indication of mean time between reboot.
                    164: .Pp
                    165: If
                    166: .Nm last
                    167: is interrupted, it indicates to what date the search has
                    168: progressed.  If interrupted with a quit signal
                    169: .Nm last
                    170: indicates how
                    171: far the search has progressed and then continues.
                    172: .Sh FILES
                    173: .Bl -tag -width /var/log/wtmp -compact
                    174: .It Pa /var/log/wtmp
                    175: login data base
                    176: .El
                    177: .Sh SEE ALSO
                    178: .Xr lastcomm 1 ,
                    179: .Xr utmp 5 ,
                    180: .Xr ac 8
                    181: .Sh HISTORY
                    182: .Nm Last
                    183: appeared in
                    184: .Bx 3.0 .