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              [ OPTION ... ]
14

DESCRIPTION

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

OPTIONS

45       --strict-match
46              Print only entries that match *all* of the arguments on the com‐
47              mand line.
48       --print-controls
49              Print control characters.
50       --user name
51              List  records for user with name.  This is useful if you're try‐
52              ing to match a username that happens to be the same as a command
53              (e.g., ed ).
54       --command name
55              List records for command name.
56       --tty name
57              List records for tty name.
58       --forwards
59              Read  file  forwards instead of backwards. This avoids trying to
60              seek on the file and can be used to read from a pipe. This  must
61              be specified prior to any -f arguments.
62       -f filename, --file filename
63              Read  from the file filename instead of acct.  A filename of "-"
64              will result in reading from stdin. This must either be the first
65              -f option, or --forwards must precede all -f options.
66       --ahz hz
67              Use this flag to tell the program what AHZ should be (in hertz).
68              This option is useful if you are trying to  view  an  acct  file
69              created  on  another  machine  which has the same byte order and
70              file format as your current machine, but has a  different  value
71              for AHZ.
72       -p, --show-paging
73              Print paging statistics.
74       --pid  Show  PID  and  PPID  of the process if acct version 3 format is
75              supported by kernel.
76       --debug
77              Print verbose internal information.
78       -V, --version
79              Print the version number of lastcomm.
80       -h, --help
81              Prints the usage string and default locations of system files to
82              standard output and exits.
83

FILES

85       acct
86              The  system  wide  process accounting file. See acct(5) (or pac‐
87              ct(5)) for further details.  /var/log/account
88                     This directory contains pacct files which contain the bi‐
89                     nary process accounting data as written by the kernel.

AUTHOR

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

SEE ALSO

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