Commit | Line | Data |
---|---|---|
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 | |
10 | lastcomm \- 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 |
17 | gives information on previously executed commands. | |
26df3ca1 KM |
18 | With no arguments, |
19 | .I lastcomm | |
20 | prints information about all the commands recorded | |
4dca6340 KB |
21 | during the current accounting file's lifetime. The \fI-f\fP option |
22 | causes \fIlastcomm\fP to read from a file other than the default | |
23 | accounting file. | |
26df3ca1 KM |
24 | If called with arguments, only accounting entries with a |
25 | matching command | |
26 | name, user name, or terminal name are printed. | |
e6d64aaa | 27 | So, for example, |
26df3ca1 KM |
28 | .ti +0.5i |
29 | lastcomm a.out root ttyd0 | |
e6d64aaa KM |
30 | .br |
31 | would produce a listing of all the | |
26df3ca1 KM |
32 | executions of commands named |
33 | .I a.out | |
34 | by user | |
35 | .I root | |
36 | on the terminal | |
37 | .IR ttyd0 . | |
e6d64aaa KM |
38 | .PP |
39 | For each process entry, the following are printed. | |
26df3ca1 KM |
40 | .in +0.5i |
41 | The name of the user who ran the process. | |
e6d64aaa | 42 | .br |
26df3ca1 | 43 | Flags, as accumulated by the accounting facilities in the system. |
e6d64aaa | 44 | .br |
26df3ca1 | 45 | The command name under which the process was called. |
e6d64aaa | 46 | .br |
26df3ca1 | 47 | The amount of cpu time used by the process (in seconds). |
e6d64aaa | 48 | .br |
26df3ca1 KM |
49 | The time the process exited. |
50 | .in -0.5i | |
51 | .PP | |
52 | The flags are encoded as follows: ``S'' indicates the command was | |
53 | executed by the super-user, ``F'' indicates the command ran after | |
54 | a 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 | 60 | file, 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 |
64 | last(1), |
65 | sigvec(2), | |
81146605 | 66 | acct(8), |
26df3ca1 | 67 | core(5) |