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