xref: /csrg-svn/usr.bin/lastcomm/lastcomm.1 (revision 62049)
1*62049Sbostic.\" Copyright (c) 1980, 1990, 1993
2*62049Sbostic.\"	The Regents of the University of California.  All rights reserved.
319163Smckusick.\"
450619Scael.\" %sccs.include.redist.roff%
519163Smckusick.\"
6*62049Sbostic.\"	@(#)lastcomm.1	8.1 (Berkeley) 06/06/93
736722Sbostic.\"
843701Scael.Dd
943701Scael.Dt LASTCOMM 1
1050619Scael.Os BSD 3
1143701Scael.Sh NAME
1243701Scael.Nm lastcomm
1343701Scael.Nd show last commands executed in reverse order
1443701Scael.Sh SYNOPSIS
1543701Scael.Nm lastcomm
1643701Scael.Op Fl f Ar file
1750619Scael.Op Ar command ...
1850619Scael.Op Ar user ...
1950619Scael.Op Ar terminal ...
2043701Scael.Sh DESCRIPTION
2143701Scael.Nm Lastcomm
2219163Smckusickgives information on previously executed commands.
2319164SmckusickWith no arguments,
2443701Scael.Nm lastcomm
2519164Smckusickprints information about all the commands recorded
2643701Scaelduring the current accounting file's lifetime.
2744955Scael.Pp
2844955ScaelOption:
2944955Scael.Pp
3050619Scael.Bl -tag -width Fl
3150619Scael.It Fl f Ar file
3244955ScaelRead from
3344955Scael.Ar file
3444955Scaelrather than the default
3533689Sbosticaccounting file.
3650619Scael.El
3743701Scael.Pp
3819164SmckusickIf called with arguments, only accounting entries with a
3943701Scaelmatching
4044955Scael.Ar command
4144955Scaelname,
4244955Scael.Ar user
4344955Scaelname,
4443701Scaelor
4544955Scael.Ar terminal
4644955Scaelname
4743701Scaelare printed.
4843701ScaelSo, for example:
4944955Scael.Pp
5043701Scael.Dl lastcomm a.out root ttyd0
5143701Scael.Pp
5219163Smckusickwould produce a listing of all the
5319164Smckusickexecutions of commands named
5443701Scael.Pa a.out
5519164Smckusickby user
5643701Scael.Ar root
5719164Smckusickon the terminal
5843701Scael.Ar ttyd0  .
5943701Scael.Pp
6019163SmckusickFor each process entry, the following are printed.
6144955Scael.Pp
6250619Scael.Bl -bullet -offset indent -compact
6350619Scael.It
6419164SmckusickThe name of the user who ran the process.
6550619Scael.It
6619164SmckusickFlags, as accumulated by the accounting facilities in the system.
6750619Scael.It
6819164SmckusickThe command name under which the process was called.
6950619Scael.It
7019164SmckusickThe amount of cpu time used by the process (in seconds).
7150619Scael.It
7219164SmckusickThe time the process exited.
7350619Scael.El
7443701Scael.Pp
7519164SmckusickThe flags are encoded as follows: ``S'' indicates the command was
7619164Smckusickexecuted by the super-user, ``F'' indicates the command ran after
7743701Scaela fork, but without a following
7843701Scael.Xr exec ,
7919164Smckusick``C'' indicates the command was run in PDP-11 compatibility mode
8019164Smckusick(VAX only),
8119164Smckusick``D'' indicates the command terminated with the generation of a
8243701Scael.Pa core
8325697Smckusickfile, and ``X'' indicates the command was terminated with a signal.
8443701Scael.Sh FILES
8550619Scael.Bl -tag -width /var/account/acct -compact
8650619Scael.It Pa /var/account/acct
8750619ScaelDefault accounting file.
8850619Scael.El
8943701Scael.Sh SEE ALSO
9043701Scael.Xr last 1 ,
9143701Scael.Xr sigvec 2 ,
9243701Scael.Xr acct 5 ,
9343701Scael.Xr core 5
9443701Scael.Sh HISTORY
9550619ScaelThe
9650619Scael.Nm lastcomm
9750619Scaelcommand appeared in
9850619Scael.Bx 3.0 .
99