04-08-2002
Try a 'tty' to see the terminal number.
Then cat /dev/tty0 > tty0.log
'cat tty0.log' or 'more tty0.log'
Or try 'cat ~user/.history' or 'more ~user/.history'.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm completely new to Unix, but familiar with Mac OSX. I've just discovered the command line terminal feature of this new OS and I'm trying to learn how to telnet into my host's server to change permissions to allow executable cgi scripts for my website. Is there anyone who might be able to... (2 Replies)
Discussion started by: tylerl
2 Replies
2. UNIX for Dummies Questions & Answers
I'd like to write a shell script that will enter '1', for example. How
do you do that?
You know, so instead of writing
echo "Enter 1 or 2"
read onetwo
and waiting for the user to enter a 1 or 2,
I'd like the script to act like someone entered a 1, or 2. Is there a
hex value for the... (1 Reply)
Discussion started by: jpprial
1 Replies
3. Shell Programming and Scripting
I wonder how I shall read the result below, especially 'what'
shown below.
The result was shown when I entered 'w'.
E.g what is TOP? What is gosh ( what does selmgr mean?)?
login@ idle JCPU PCPU what
6:15am 7:04 39 39 TOP
6:34am 6:45 45 45 TOP
6:41am ... (1 Reply)
Discussion started by: Aelgen
1 Replies
4. UNIX for Advanced & Expert Users
Can anybody help me?
I am developing a utility for automating message paging to a BT alphanumeric pager.
I am using a USR 56K Fax-modem connected to /dev/cuab on a Sun Ultra-10. I am using the UNIX 'tip' utility to connect to the modem and I have configured the modem as follows: Baud Rate:... (2 Replies)
Discussion started by: mybeat
2 Replies
5. UNIX for Dummies Questions & Answers
echo 'it's friday'
why appear the > (3 Replies)
Discussion started by: yls177
3 Replies
6. UNIX for Advanced & Expert Users
Somehow someone created a file named '-ov' in the root directory.
Given the name, the how was probably the result of some cpio command they bozo'ed.
I've tried a number of different ways to get rid of it using * and ? wildcards, '\' escape patterns etc.. They all fail with " illegal option --... (3 Replies)
Discussion started by: GSalisbury
3 Replies
7. Shell Programming and Scripting
Hopefully this doesn't come off as too much of a "newbie" question or a flamebait. But I have recently begun working with a Sun Solaris box after having spent the past five years working with RedHat. From what i can tell, thing look fairly similar and the 'man' command is some help. But I've... (7 Replies)
Discussion started by: deckard
7 Replies
8. HP-UX
Hi all
I hope to find what i'm looking for in this forum
as said in the topic i want to track user's actions on the system. i mean also the action of moving or removing files. I have an HP 9000 with HP UX 11i. the users log on the HP from a terminal window under WIndows XP
Thx (3 Replies)
Discussion started by: Timberland
3 Replies
9. Solaris
Dear All,
I want to enable the tracing for a user and logging all things he do in a log file..........
Thaaanks (2 Replies)
Discussion started by: adel8483
2 Replies
10. OS X (Apple)
Hey everyone,
Being new to the deeper levels of OS X and UNIX I am hoping the bright minds on the board could push me in the right direction.
On a daily basis I work as a CG Generalist (creating 3D for film) and I am using a 3th party render engine with my main 3D program (Autodesk Maya)... (0 Replies)
Discussion started by: SofusGraae
0 Replies
LEARN ABOUT CENTOS
lastcomm
LASTCOMM(1) General Commands Manual LASTCOMM(1)
NAME
lastcomm - print out information about previously executed commands.
SYNOPSIS
lastcomm
[ command-name ... ]
[ user-name ... ]
[ terminal-name ... ]
[ OPTION ... ]
DESCRIPTION
lastcomm prints out information about previously executed commands. If no arguments are specified, lastcomm will print info about all of
the commands in acct (the record file). If called with one or more of command-name, user-name, or terminal-name, only records containing
those items will be displayed. For example, to find out which users used command `a.out' and which users were logged into `tty0', type:
lastcomm a.out tty0
This will print any entry for which `a.out' or `tty0' matches in any of the record's fields (command, name, or terminal). If you want to
find only items that match *all* of the arguments on the command line, you must use the '-strict-match' option. For example, to list all
of the executions of command a.out by user root on terminal tty0, type:
lastcomm --strict-match --command a.out --user root --tty tty0
The order of the arguments is not important.
For each entry the following information is printed:
+ command name of the process
+ flags, as recorded by the system accounting routines:
S -- command executed by super-user
F -- command executed after a fork but without a following exec
C -- command run in PDP-11 compatibility mode (VAX only)
D -- command terminated with the generation of a core file
X -- command was terminated with the signal SIGTERM
+ the name of the user who ran the process
+ time the process started
OPTIONS
--strict-match
Print only entries that match *all* of the arguments on the command line.
--print-controls
Print control characters.
--user name
List records for user with name. This is useful if you're trying to match a username that happens to be the same as a command
(e.g., ed ).
--command name
List records for command name.
--tty name
List records for tty name.
--forwards
Read file forwards instead of backwards. This avoids trying to seek on the file and can be used to read from a pipe. This must be
specified prior to any -f arguments.
-f filename, --file filename
Read from the file filename instead of acct. A filename of "-" will result in reading from stdin. This must either be the first -f
option, or --forwards must precede all -f options.
--ahz hz
Use this flag to tell the program what AHZ should be (in hertz). This option is useful if you are trying to view an acct file cre-
ated on another machine which has the same byte order and file format as your current machine, but has a different value for AHZ.
-p, --show-paging
Print paging statistics
--debug
Print verbose internal information.
-V, --version
Print the version number of lastcomm.
-h, --help
Prints the usage string and default locations of system files to standard output and exits.
FILES
acct
The system wide process accounting file. See acct(5) (or pacct(5)) for further details. /var/log/account
This directory contains pacct files which contain the binary process accounting data as written by the kernel.
AUTHOR
The GNU accounting utilities were written by Noel Cragg <noel@gnu.ai.mit.edu>. The man page was adapted from the accounting texinfo page by
Susan Kleinmann <sgk@sgk.tiac.net>.
SEE ALSO
last(1), acct(5)
1995 October 31 LASTCOMM(1)