[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.5

1.5     ! deraadt     1: .\"    $OpenBSD: lastcomm.1,v 1.4 1996/06/26 05:34:53 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.
                     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: .\"    @(#)lastcomm.1  8.1 (Berkeley) 6/6/93
                     36: .\"
                     37: .Dd June 6, 1993
                     38: .Dt LASTCOMM 1
                     39: .Os BSD 3
                     40: .Sh NAME
                     41: .Nm lastcomm
                     42: .Nd show last commands executed in reverse order
                     43: .Sh SYNOPSIS
                     44: .Nm lastcomm
                     45: .Op Fl f Ar file
                     46: .Op Ar command ...
                     47: .Op Ar user ...
                     48: .Op Ar terminal ...
                     49: .Sh DESCRIPTION
                     50: .Nm Lastcomm
                     51: gives information on previously executed commands.
                     52: With no arguments,
                     53: .Nm lastcomm
                     54: prints information about all the commands recorded
                     55: during the current accounting file's lifetime.
                     56: .Pp
                     57: Option:
                     58: .Pp
                     59: .Bl -tag -width Fl
                     60: .It Fl f Ar file
                     61: Read from
                     62: .Ar file
                     63: rather than the default
                     64: accounting file.
                     65: .El
                     66: .Pp
                     67: If called with arguments, only accounting entries with a
                     68: matching
                     69: .Ar command
                     70: name,
                     71: .Ar user
                     72: name,
                     73: or
                     74: .Ar terminal
                     75: name
                     76: are printed.
                     77: So, for example:
                     78: .Pp
                     79: .Dl lastcomm a.out root ttyd0
                     80: .Pp
                     81: would produce a listing of all the
                     82: executions of commands named
                     83: .Pa a.out
                     84: by user
                     85: .Ar root
                     86: on the terminal
                     87: .Ar ttyd0  .
                     88: .Pp
                     89: For each process entry, the following are printed.
                     90: .Pp
                     91: .Bl -bullet -offset indent -compact
                     92: .It
                     93: The name of the user who ran the process.
                     94: .It
                     95: Flags, as accumulated by the accounting facilities in the system.
                     96: .It
                     97: The command name under which the process was called.
                     98: .It
                     99: The amount of cpu time used by the process (in seconds).
                    100: .It
1.2       deraadt   101: The time the process started.
1.3       deraadt   102: .It
                    103: The elapsed time of the process.
1.1       deraadt   104: .El
                    105: .Pp
                    106: The flags are encoded as follows: ``S'' indicates the command was
                    107: executed by the super-user, ``F'' indicates the command ran after
                    108: a fork, but without a following
                    109: .Xr exec ,
                    110: ``C'' indicates the command was run in PDP-11 compatibility mode
                    111: (VAX only),
                    112: ``D'' indicates the command terminated with the generation of a
                    113: .Pa core
                    114: file, and ``X'' indicates the command was terminated with a signal.
                    115: .Sh FILES
                    116: .Bl -tag -width /var/account/acct -compact
                    117: .It Pa /var/account/acct
                    118: Default accounting file.
                    119: .El
                    120: .Sh SEE ALSO
                    121: .Xr last 1 ,
                    122: .Xr sigvec 2 ,
                    123: .Xr acct 5 ,
1.5     ! deraadt   124: .Xr accton 8,
1.1       deraadt   125: .Xr core 5
                    126: .Sh HISTORY
                    127: The
                    128: .Nm lastcomm
                    129: command appeared in
                    130: .Bx 3.0 .