Commit | Line | Data |
---|---|---|
524f1b27 C |
1 | LASTCOMM(1) UNIX Reference Manual LASTCOMM(1) |
2 | ||
3 | N\bNA\bAM\bME\bE | |
4 | l\bla\bas\bst\btc\bco\bom\bmm\bm - show last commands executed in reverse order | |
5 | ||
6 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS | |
7 | l\bla\bas\bst\btc\bco\bom\bmm\bm [-\b-f\bf _\bf_\bi_\bl_\be] [_\bc_\bo_\bm_\bm_\ba_\bn_\bd ...] [_\bu_\bs_\be_\br ...] [_\bt_\be_\br_\bm_\bi_\bn_\ba_\bl ...] | |
8 | ||
9 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
10 | L\bLa\bas\bst\btc\bco\bom\bmm\bm gives information on previously executed commands. With no ar- | |
11 | guments, l\bla\bas\bst\btc\bco\bom\bmm\bm prints information about all the commands recorded dur- | |
12 | ing the current accounting file's lifetime. | |
13 | ||
14 | Option: | |
15 | ||
16 | -\b-f\bf _\bf_\bi_\bl_\be Read from _\bf_\bi_\bl_\be rather than the default accounting file. | |
17 | ||
18 | If called with arguments, only accounting entries with a matching _\bc_\bo_\bm_\bm_\ba_\bn_\bd | |
19 | name, _\bu_\bs_\be_\br name, or _\bt_\be_\br_\bm_\bi_\bn_\ba_\bl name are printed. So, for example: | |
20 | ||
21 | lastcomm a.out root ttyd0 | |
22 | ||
23 | would produce a listing of all the executions of commands named _\ba._\bo_\bu_\bt by | |
24 | user _\br_\bo_\bo_\bt on the terminal _\bt_\bt_\by_\bd_\b0. | |
25 | ||
26 | For each process entry, the following are printed. | |
27 | ||
28 | The name of the user who ran the process. | |
29 | Flags, as accumulated by the accounting facilities in the system. | |
30 | The command name under which the process was called. | |
31 | The amount of cpu time used by the process (in seconds). | |
32 | The time the process exited. | |
33 | ||
34 | The flags are encoded as follows: ``S'' indicates the command was execut- | |
35 | ed by the super-user, ``F'' indicates the command ran after a fork, but | |
36 | without a following exec, ``C'' indicates the command was run in PDP-11 | |
37 | compatibility mode (VAX only), ``D'' indicates the command terminated | |
38 | with the generation of a _\bc_\bo_\br_\be file, and ``X'' indicates the command was | |
39 | terminated with a signal. | |
40 | ||
41 | F\bFI\bIL\bLE\bES\bS | |
42 | /_\bv_\ba_\br/_\ba_\bc_\bc_\bo_\bu_\bn_\bt/_\ba_\bc_\bc_\bt | |
43 | ||
44 | ||
45 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
46 | last(1), sigvec(2), acct(5), core(5) | |
47 | ||
48 | H\bHI\bIS\bST\bTO\bOR\bRY\bY | |
49 | L\bLa\bas\bst\btc\bco\bom\bmm\bm appeared in 3 BSD. |