143701Scael.\" Copyright (c) 1980, 1990 The Regents of the University of California. 236722Sbostic.\" All rights reserved. 319163Smckusick.\" 443701Scael.\" %sccs.include.redist.man% 519163Smckusick.\" 6*44955Scael.\" @(#)lastcomm.1 6.6 (Berkeley) 07/24/90 736722Sbostic.\" 843701Scael.Dd 943701Scael.Dt LASTCOMM 1 10*44955Scael.Os BSD 3.0 1143701Scael.Sh NAME 1243701Scael.Nm lastcomm 1343701Scael.Nd show last commands executed in reverse order 1443701Scael.Sh SYNOPSIS 1543701Scael.Nm lastcomm 1643701Scael.Op Fl f Ar file 17*44955Scael.Op Ar command \&... 18*44955Scael.Op Ar user \&... 19*44955Scael.Op Ar terminal \&... 2043701Scael.Sh DESCRIPTION 2143701Scael.Nm Lastcomm 2219163Smckusickgives information on previously executed commands. 2319164SmckusickWith no arguments, 2443701Scael.Nm lastcomm 2519164Smckusickprints information about all the commands recorded 2643701Scaelduring the current accounting file's lifetime. 27*44955Scael.Pp 28*44955ScaelOption: 29*44955Scael.Pp 30*44955Scael.Tw Fl 31*44955Scael.Tp Cx Fl f 32*44955Scael.Ws 33*44955Scael.Ar file 34*44955Scael.Cx 35*44955ScaelRead from 36*44955Scael.Ar file 37*44955Scaelrather than the default 3833689Sbosticaccounting file. 3943701Scael.Tp 4043701Scael.Pp 4119164SmckusickIf called with arguments, only accounting entries with a 4243701Scaelmatching 43*44955Scael.Ar command 44*44955Scaelname, 45*44955Scael.Ar user 46*44955Scaelname, 4743701Scaelor 48*44955Scael.Ar terminal 49*44955Scaelname 5043701Scaelare printed. 5143701ScaelSo, for example: 52*44955Scael.Pp 5343701Scael.Dl lastcomm a.out root ttyd0 5443701Scael.Pp 5519163Smckusickwould produce a listing of all the 5619164Smckusickexecutions of commands named 5743701Scael.Pa a.out 5819164Smckusickby user 5943701Scael.Ar root 6019164Smckusickon the terminal 6143701Scael.Ar ttyd0 . 6243701Scael.Pp 6319163SmckusickFor each process entry, the following are printed. 64*44955Scael.Pp 6543701Scael.Ds I 6619164SmckusickThe name of the user who ran the process. 6719164SmckusickFlags, as accumulated by the accounting facilities in the system. 6819164SmckusickThe command name under which the process was called. 6919164SmckusickThe amount of cpu time used by the process (in seconds). 7019164SmckusickThe time the process exited. 7143701Scael.De 7243701Scael.Pp 7319164SmckusickThe flags are encoded as follows: ``S'' indicates the command was 7419164Smckusickexecuted by the super-user, ``F'' indicates the command ran after 7543701Scaela fork, but without a following 7643701Scael.Xr exec , 7719164Smckusick``C'' indicates the command was run in PDP-11 compatibility mode 7819164Smckusick(VAX only), 7919164Smckusick``D'' indicates the command terminated with the generation of a 8043701Scael.Pa core 8125697Smckusickfile, and ``X'' indicates the command was terminated with a signal. 8243701Scael.Sh FILES 8343701Scael.Dw /var/account/acct 8443701Scael.Di L 8543701Scael.Dp Pa /var/account/acct 8643701Scael.Dp 8743701Scael.Sh SEE ALSO 8843701Scael.Xr last 1 , 8943701Scael.Xr sigvec 2 , 9043701Scael.Xr acct 5 , 9143701Scael.Xr core 5 9243701Scael.Sh HISTORY 9343701Scael.Nm Lastcomm 9443701Scaelappeared in 3 BSD. 95