4.3BSD-Reno/src/usr.bin/lastcomm/lastcomm.1

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1980, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement:  ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" Neither the name of the University nor the names of its contributors may
.\" be used to endorse or promote products derived from this software without
.\" specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\"     @(#)lastcomm.1	6.6 (Berkeley) 7/24/90
.\"
.Dd July 24, 1990
.Dt LASTCOMM 1
.Os BSD 3.0
.Sh NAME
.Nm lastcomm
.Nd show last commands executed in reverse order
.Sh SYNOPSIS
.Nm lastcomm
.Op Fl f Ar file
.Op Ar command \&...
.Op Ar user \&...
.Op Ar terminal \&...
.Sh DESCRIPTION
.Nm Lastcomm
gives information on previously executed commands.
With no arguments,
.Nm lastcomm
prints information about all the commands recorded
during the current accounting file's lifetime.
.Pp
Option:
.Pp
.Tw Fl
.Tp Cx Fl f
.Ws
.Ar file
.Cx
Read from
.Ar file
rather than the default
accounting file.
.Tp
.Pp
If called with arguments, only accounting entries with a
matching
.Ar command
name,
.Ar user
name,
or
.Ar terminal
name
are printed.
So, for example:
.Pp
.Dl lastcomm a.out root ttyd0
.Pp
would produce a listing of all the
executions of commands named
.Pa a.out
by user
.Ar root
on the terminal
.Ar ttyd0  .
.Pp
For each process entry, the following are printed.
.Pp
.Ds I
The name of the user who ran the process.
Flags, as accumulated by the accounting facilities in the system.
The command name under which the process was called.
The amount of cpu time used by the process (in seconds).
The time the process exited.
.De
.Pp
The flags are encoded as follows: ``S'' indicates the command was
executed by the super-user, ``F'' indicates the command ran after
a fork, but without a following
.Xr exec ,
``C'' indicates the command was run in PDP-11 compatibility mode
(VAX only),
``D'' indicates the command terminated with the generation of a
.Pa core
file, and ``X'' indicates the command was terminated with a signal.
.Sh FILES
.Dw /var/account/acct
.Di L
.Dp Pa /var/account/acct
.Dp
.Sh SEE ALSO
.Xr last 1 ,
.Xr sigvec 2 ,
.Xr acct 5 ,
.Xr core 5
.Sh HISTORY
.Nm Lastcomm
appeared in 3 BSD.