DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
(BSD System Compatibility)

lastcomm(1bsd)


lastcomm -- (BSD) show the last commands executed, in reverse order

Synopsis

   /usr/ucb/lastcomm [command] . . . [user] . . . [terminal] . . .

Description

The lastcomm command gives information on previously executed commands. lastcomm with no arguments displays information about all the commands recorded during the current accounting file's lifetime. If called with arguments, lastcomm only displays accounting entries with a matching command, user, or terminal.

Files


/var/adm/pacct
accounting file

References

acct(4), acctsh(1M), core(4), last(1), sigvec(3bsd)

Notices

lastcomm looks for the file /var/adm/pacct, and will fail if it does not find it. Accounting must be turned on, by executing /usr/lib/acct/startup, which creates the pacct file.

Examples

The command:
   lastcomm a.out root term/01

would produce a listing of all the executions of commands named a.out, by user root while using the terminal term/01, and

   lastcomm root

would produce a listing of all the commands executed by user root.

For each process entry, lastcomm displays the following items of information:


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004