1.\" Copyright (c) 1980, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)lastcomm.1 6.5 (Berkeley) 06/24/90 7.\" 8.Dd 9.Dt LASTCOMM 1 10.UC 11.Sh NAME 12.Nm lastcomm 13.Nd show last commands executed in reverse order 14.Sh SYNOPSIS 15.Nm lastcomm 16.Op Fl f Ar file 17.Op Ar command name 18\&... 19.Op Ar user name 20\&... 21.Op Ar terminal name 22\&... 23.Sh DESCRIPTION 24.Nm Lastcomm 25gives information on previously executed commands. 26With no arguments, 27.Nm lastcomm 28prints information about all the commands recorded 29during the current accounting file's lifetime. 30.Tw Ds 31.Tp Fl f 32option 33causes 34.Nm lastcomm 35to read from a file other than the default 36accounting file. 37.Tp 38.Pp 39If called with arguments, only accounting entries with a 40matching 41.Ar command name , 42.Ar user name , 43or 44.Ar terminal name 45are printed. 46So, for example: 47.Dl lastcomm a.out root ttyd0 48.Pp 49would produce a listing of all the 50executions of commands named 51.Pa a.out 52by user 53.Ar root 54on the terminal 55.Ar ttyd0 . 56.Pp 57For each process entry, the following are printed. 58.Ds I 59The name of the user who ran the process. 60Flags, as accumulated by the accounting facilities in the system. 61The command name under which the process was called. 62The amount of cpu time used by the process (in seconds). 63The time the process exited. 64.De 65.Pp 66The flags are encoded as follows: ``S'' indicates the command was 67executed by the super-user, ``F'' indicates the command ran after 68a fork, but without a following 69.Xr exec , 70``C'' indicates the command was run in PDP-11 compatibility mode 71(VAX only), 72``D'' indicates the command terminated with the generation of a 73.Pa core 74file, and ``X'' indicates the command was terminated with a signal. 75.Sh FILES 76.Dw /var/account/acct 77.Di L 78.Dp Pa /var/account/acct 79.Dp 80.Sh SEE ALSO 81.Xr last 1 , 82.Xr sigvec 2 , 83.Xr acct 5 , 84.Xr core 5 85.Sh HISTORY 86.Nm Lastcomm 87appeared in 3 BSD. 88