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

Annotation of src/usr.bin/lastcomm/lastcomm.1, Revision 1.22

1.22    ! millert     1: .\"    $OpenBSD: lastcomm.1,v 1.21 2019/07/25 19:05:22 deraadt Exp $
1.3       deraadt     2: .\"    $NetBSD: lastcomm.1,v 1.5 1995/10/22 01:43:41 ghudson Exp $
1.1       deraadt     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.
1.14      millert    15: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    16: .\"    may be used to endorse or promote products derived from this software
                     17: .\"    without specific prior written permission.
                     18: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29: .\" SUCH DAMAGE.
                     30: .\"
                     31: .\"    @(#)lastcomm.1  8.1 (Berkeley) 6/6/93
                     32: .\"
1.21      deraadt    33: .Dd $Mdocdate: July 25 2019 $
1.1       deraadt    34: .Dt LASTCOMM 1
1.11      aaron      35: .Os
1.1       deraadt    36: .Sh NAME
                     37: .Nm lastcomm
                     38: .Nd show last commands executed in reverse order
                     39: .Sh SYNOPSIS
                     40: .Nm lastcomm
                     41: .Op Fl f Ar file
                     42: .Op Ar command ...
                     43: .Op Ar user ...
                     44: .Op Ar terminal ...
                     45: .Sh DESCRIPTION
1.8       aaron      46: .Nm lastcomm
1.1       deraadt    47: gives information on previously executed commands.
                     48: With no arguments,
                     49: .Nm lastcomm
                     50: prints information about all the commands recorded
                     51: during the current accounting file's lifetime.
                     52: .Pp
1.12      aaron      53: The options are as follows:
1.13      aaron      54: .Bl -tag -width Ds
1.1       deraadt    55: .It Fl f Ar file
                     56: Read from
                     57: .Ar file
                     58: rather than the default
                     59: accounting file.
                     60: .El
                     61: .Pp
                     62: If called with arguments, only accounting entries with a
                     63: matching
                     64: .Ar command
                     65: name,
                     66: .Ar user
                     67: name,
                     68: or
                     69: .Ar terminal
                     70: name
                     71: are printed.
                     72: So, for example:
                     73: .Pp
                     74: .Dl lastcomm a.out root ttyd0
                     75: .Pp
                     76: would produce a listing of all the
                     77: executions of commands named
                     78: .Pa a.out
                     79: by user
                     80: .Ar root
                     81: on the terminal
1.12      aaron      82: .Ar ttyd0 .
1.1       deraadt    83: .Pp
1.8       aaron      84: For each process entry, the following are printed:
1.1       deraadt    85: .Pp
                     86: .Bl -bullet -offset indent -compact
                     87: .It
1.8       aaron      88: Name of the user who ran the process.
1.1       deraadt    89: .It
1.12      aaron      90: Flags, as accumulated by the system's accounting facilities.
1.1       deraadt    91: .It
1.8       aaron      92: Command name under which the process was called.
1.1       deraadt    93: .It
1.12      aaron      94: Amount of CPU time used by the process (in seconds).
1.1       deraadt    95: .It
1.8       aaron      96: Time the process started.
1.3       deraadt    97: .It
1.8       aaron      98: Elapsed time of the process.
1.1       deraadt    99: .El
                    100: .Pp
1.12      aaron     101: The flags are encoded as follows:
1.21      deraadt   102: .Pp
                    103: .Bl -tag -width 6n -compact -offset indent
                    104: .It Li C
                    105: The command was run in PDP-11 compatibility mode
                    106: (VAX only).
                    107: .It Li D
                    108: The command terminated with the generation of a
                    109: .Pa core
                    110: file.
                    111: .It Li F
                    112: The command ran after
1.1       deraadt   113: a fork, but without a following
1.21      deraadt   114: .Xr exec 3 .
                    115: .It Li P
                    116: The command was terminated due to a
1.17      bluhm     117: .Xr pledge 2
1.21      deraadt   118: violation.
                    119: .It Li T
                    120: The command did a memory access violation detected by a
                    121: processor trap.
                    122: .It Li U
                    123: The command tried a file access that was prevented by
1.20      bluhm     124: .Xr unveil 2 .
1.21      deraadt   125: .It Li X
                    126: The command was terminated with a signal.
                    127: .El
1.1       deraadt   128: .Sh FILES
                    129: .Bl -tag -width /var/account/acct -compact
                    130: .It Pa /var/account/acct
1.8       aaron     131: default accounting file
1.1       deraadt   132: .El
                    133: .Sh SEE ALSO
                    134: .Xr last 1 ,
1.22    ! millert   135: .Xr sigaction 2 ,
1.1       deraadt   136: .Xr acct 5 ,
1.10      alex      137: .Xr core 5 ,
                    138: .Xr accton 8
1.1       deraadt   139: .Sh HISTORY
                    140: The
                    141: .Nm lastcomm
                    142: command appeared in
                    143: .Bx 3.0 .