xref: /csrg-svn/usr.bin/lastcomm/lastcomm.1 (revision 43701)
1*43701Scael.\" Copyright (c) 1980, 1990 The Regents of the University of California.
236722Sbostic.\" All rights reserved.
319163Smckusick.\"
4*43701Scael.\" %sccs.include.redist.man%
519163Smckusick.\"
6*43701Scael.\"     @(#)lastcomm.1	6.5 (Berkeley) 06/24/90
736722Sbostic.\"
8*43701Scael.Dd
9*43701Scael.Dt LASTCOMM 1
1019163Smckusick.UC
11*43701Scael.Sh NAME
12*43701Scael.Nm lastcomm
13*43701Scael.Nd show last commands executed in reverse order
14*43701Scael.Sh SYNOPSIS
15*43701Scael.Nm lastcomm
16*43701Scael.Op Fl f Ar file
17*43701Scael.Op Ar command name
18*43701Scael\&...
19*43701Scael.Op Ar user name
20*43701Scael\&...
21*43701Scael.Op Ar terminal name
22*43701Scael\&...
23*43701Scael.Sh DESCRIPTION
24*43701Scael.Nm Lastcomm
2519163Smckusickgives information on previously executed commands.
2619164SmckusickWith no arguments,
27*43701Scael.Nm lastcomm
2819164Smckusickprints information about all the commands recorded
29*43701Scaelduring the current accounting file's lifetime.
30*43701Scael.Tw Ds
31*43701Scael.Tp Fl f
32*43701Scaeloption
33*43701Scaelcauses
34*43701Scael.Nm lastcomm
35*43701Scaelto read from a file other than the default
3633689Sbosticaccounting file.
37*43701Scael.Tp
38*43701Scael.Pp
3919164SmckusickIf called with arguments, only accounting entries with a
40*43701Scaelmatching
41*43701Scael.Ar command name ,
42*43701Scael.Ar user name ,
43*43701Scaelor
44*43701Scael.Ar terminal name
45*43701Scaelare printed.
46*43701ScaelSo, for example:
47*43701Scael.Dl lastcomm a.out root ttyd0
48*43701Scael.Pp
4919163Smckusickwould produce a listing of all the
5019164Smckusickexecutions of commands named
51*43701Scael.Pa a.out
5219164Smckusickby user
53*43701Scael.Ar root
5419164Smckusickon the terminal
55*43701Scael.Ar ttyd0  .
56*43701Scael.Pp
5719163SmckusickFor each process entry, the following are printed.
58*43701Scael.Ds I
5919164SmckusickThe name of the user who ran the process.
6019164SmckusickFlags, as accumulated by the accounting facilities in the system.
6119164SmckusickThe command name under which the process was called.
6219164SmckusickThe amount of cpu time used by the process (in seconds).
6319164SmckusickThe time the process exited.
64*43701Scael.De
65*43701Scael.Pp
6619164SmckusickThe flags are encoded as follows: ``S'' indicates the command was
6719164Smckusickexecuted by the super-user, ``F'' indicates the command ran after
68*43701Scaela fork, but without a following
69*43701Scael.Xr exec ,
7019164Smckusick``C'' indicates the command was run in PDP-11 compatibility mode
7119164Smckusick(VAX only),
7219164Smckusick``D'' indicates the command terminated with the generation of a
73*43701Scael.Pa core
7425697Smckusickfile, and ``X'' indicates the command was terminated with a signal.
75*43701Scael.Sh FILES
76*43701Scael.Dw /var/account/acct
77*43701Scael.Di L
78*43701Scael.Dp Pa /var/account/acct
79*43701Scael.Dp
80*43701Scael.Sh SEE ALSO
81*43701Scael.Xr last 1 ,
82*43701Scael.Xr sigvec 2 ,
83*43701Scael.Xr acct 5 ,
84*43701Scael.Xr core 5
85*43701Scael.Sh HISTORY
86*43701Scael.Nm Lastcomm
87*43701Scaelappeared in 3 BSD.
88