1LASTCOMM(1) General Commands Manual LASTCOMM(1)
2
3
4
6 lastcomm - print out information about previously executed commands.
7
9 lastcomm
10 [ command-name ... ]
11 [ user-name ... ]
12 [ terminal-name ... ]
13 [ --strict-match ]
14 [ --forwards ]
15 [ -f filename | --file filename ] [ --ahz hz ]
16 [ --user name ] [ --command name ] [ --tty name ]
17 [
18 | --show_paging ] [ --debug ] [ -V | --version ] [ -h | --help ]
19
21 lastcomm prints out information about previously executed commands. If
22 no arguments are specified, lastcomm will print info about all of the
23 commands in acct (the record file). If called with one or more of com‐
24 mand-name, user-name, or terminal-name, only records containing those
25 items will be displayed. For example, to find out which users used
26 command `a.out' and which users were logged into `tty0', type:
27 lastcomm a.out tty0
28
29 This will print any entry for which `a.out' or `tty0' matches in any of
30 the record's fields (command, name, or terminal). If you want to find
31 only items that match *all* of the arguments on the command line, you
32 must use the '-strict-match' option. For example, to list all of the
33 executions of command a.out by user root on terminal tty0, type:
34 lastcomm --strict-match --command a.out --user root --tty tty0
35
36 The order of the arguments is not important.
37
38 For each entry the following information is printed:
39 + command name of the process
40 + flags, as recorded by the system accounting routines:
41 S -- command executed by super-user
42 F -- command executed after a fork but without a following exec
43 C -- command run in PDP-11 compatibility mode (VAX only)
44 D -- command terminated with the generation of a core file
45 X -- command was terminated with the signal SIGTERM
46 + the name of the user who ran the process
47 + time the process started
48
50 --strict-match
51 Print only entries that match *all* of the arguments on the com‐
52 mand line.
53 --user name
54 List records for user with name. This is useful if you're try‐
55 ing to match a username that happens to be the same as a command
56 (e.g., ed ).
57 --command name
58 List records for command name.
59 --tty name
60 List records for tty name.
61 --forwards
62 Read file forwards instead of backwards. This avoids trying to
63 seek on the file and can be used to read from a pipe. This must
64 be specified prior to any -f arguments.
65 -f filename, --file filename
66 Read from the file filename instead of acct. A filename of "-"
67 will result in reading from stdin. This must either be the first
68 -f option, or --forwards must precede all -f options.
69 --ahz hz
70 Use this flag to tell the program what AHZ should be (in hertz).
71 This option is useful if you are trying to view an acct file
72 created on another machine which has the same byte order and
73 file format as your current machine, but has a different value
74 for AHZ.
75 -p, --show-paging
76 Print paging statistics
77 --debug
78 Print verbose internal information.
79 -V, --version
80 Print the version number of lastcomm.
81 -h, --help
82 Prints the usage string and default locations of system files to
83 standard output and exits.
84
86 acct
87 The system wide process accounting file. See acct(5) (or pac‐
88 ct(5)) for further details.
90 The GNU accounting utilities were written by Noel Cragg
91 <noel@gnu.ai.mit.edu>. The man page was adapted from the accounting
92 texinfo page by Susan Kleinmann <sgk@sgk.tiac.net>.
94 last(1), acct(5)
95
96
97
98
99 1995 October 31 LASTCOMM(1)