1LASTCOMM(1)                 General Commands Manual                LASTCOMM(1)
2
3
4

NAME

6       lastcomm -  print out information about previously executed commands.
7

SYNOPSIS

9       lastcomm
10              [ command-name ...  ]
11              [ user-name ...  ]
12              [ terminal-name ...  ]
13              [ --strict-match ]
14              [ -f filename | --file filename ]
15              [ --user name ] [ --command name ] [ --tty name ]
16              [ --debug ] [ -pid ] [ -V | --version ] [ -h | --help ]
17

DESCRIPTION

19       lastcomm prints out information about previously executed commands.  If
20       no arguments are specified, lastcomm will print info about all  of  the
21       commands in acct (the record file).  If called with one or more of com‐
22       mand-name, user-name, or terminal-name, only records  containing  those
23       items  will  be  displayed.   For example, to find out which users used
24       command `a.out' and which users were logged into `tty0', type:
25                                 lastcomm a.out tty0
26
27       This will print any entry for which `a.out' or `tty0' matches in any of
28       the  record's fields (command, name, or terminal).  If you want to find
29       only items that match *all* of the arguments on the command  line,  you
30       must  use  the '-strict-match' option.  For example, to list all of the
31       executions of command a.out by user root on terminal tty0, type:
32                       lastcomm --strict-match a.out root tty0
33
34       The order of the arguments is not important.
35
36       For each entry the following information is printed:
37          + command name of the process
38          + flags, as recorded by the system accounting routines:
39               S -- command executed by super-user
40               F -- command executed after a fork but without a following exec
41               C -- command run in PDP-11 compatibility mode (VAX only)
42               D -- command terminated with the generation of a core file
43               X -- command was terminated with the signal SIGTERM
44          + the name of the user who ran the process
45          + time the process started
46

OPTIONS

48       --strict-match
49              Print only entries that match *all* of the arguments on the com‐
50              mand line.
51
52       --user name
53              List  records for user with name.  This is useful if you're try‐
54              ing to match a username that happens to be the same as a command
55              (e.g., ed ).
56
57       --command name
58              List records for command name.
59
60       --tty name
61              List records for tty name.
62
63       -f filename, --file filename
64              Read from the file filename instead of acct
65
66       --pid  add pid of the process and pid of the process parent to the out‐
67              put (pid is the last but one and parent pid  the  last  column).
68              These  values  are  shown  only  when they are generated by acct
69              function (depends on the version of kernel)
70
71       --debug
72              Print verbose internal information.
73
74       -V, --version
75              Print the version number of lastcomm.
76
77       -h, --help
78              Prints the usage string and default locations of system files to
79              standard output and exits.
80
81

FILES

83       acct
84              The  system  wide  process accounting file. See acct(5) (or pac‐
85              ct(5)) for further details.
86

AUTHOR

88       The   GNU   accounting   utilities   were   written   by   Noel   Cragg
89       <noel@gnu.ai.mit.edu>.  The  man  page  was adapted from the accounting
90       texinfo page by Susan Kleinmann <sgk@sgk.tiac.net>.
91

SEE ALSO

93       last(1), acct(5)
94
95
96
97
98                                1995 October 31                    LASTCOMM(1)
Impressum