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