document the -f option
[unix-history] / usr / src / usr.bin / lastcomm / lastcomm.1
CommitLineData
e6d64aaa
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
4dca6340 5.\" @(#)lastcomm.1 6.3 (Berkeley) %G%
e6d64aaa 6.\"
81146605 7.TH LASTCOMM 1 ""
e6d64aaa
KM
8.UC
9.SH NAME
10lastcomm \- show last commands executed in reverse order
11.SH SYNOPSIS
12.B lastcomm
4dca6340 13[ -f file ]
26df3ca1 14[ command name ] ... [user name] ... [terminal name] ...
e6d64aaa 15.SH DESCRIPTION
e6d64aaa
KM
16.I Lastcomm
17gives information on previously executed commands.
26df3ca1
KM
18With no arguments,
19.I lastcomm
20prints information about all the commands recorded
4dca6340
KB
21during the current accounting file's lifetime. The \fI-f\fP option
22causes \fIlastcomm\fP to read from a file other than the default
23accounting file.
26df3ca1
KM
24If called with arguments, only accounting entries with a
25matching command
26name, user name, or terminal name are printed.
e6d64aaa 27So, for example,
26df3ca1
KM
28.ti +0.5i
29lastcomm a.out root ttyd0
e6d64aaa
KM
30.br
31would produce a listing of all the
26df3ca1
KM
32executions of commands named
33.I a.out
34by user
35.I root
36on the terminal
37.IR ttyd0 .
e6d64aaa
KM
38.PP
39For each process entry, the following are printed.
26df3ca1
KM
40.in +0.5i
41The name of the user who ran the process.
e6d64aaa 42.br
26df3ca1 43Flags, as accumulated by the accounting facilities in the system.
e6d64aaa 44.br
26df3ca1 45The command name under which the process was called.
e6d64aaa 46.br
26df3ca1 47The amount of cpu time used by the process (in seconds).
e6d64aaa 48.br
26df3ca1
KM
49The time the process exited.
50.in -0.5i
51.PP
52The flags are encoded as follows: ``S'' indicates the command was
53executed by the super-user, ``F'' indicates the command ran after
54a fork, but without a following
55.IR exec ,
56``C'' indicates the command was run in PDP-11 compatibility mode
57(VAX only),
58``D'' indicates the command terminated with the generation of a
59.I core
aacaffde 60file, and ``X'' indicates the command was terminated with a signal.
81146605
KM
61.SH FILES
62/usr/adm/acct
e6d64aaa 63.SH "SEE ALSO"
26df3ca1
KM
64last(1),
65sigvec(2),
81146605 66acct(8),
26df3ca1 67core(5)