02-11-2008
use command log
Dear all
I also want to log of command given by specific user.
Kindly sugest me....
lastcomm command is not runing in my system..
plz send other possible way...
8 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All,
Whenever I log in to my terminal and execute some cmds and then I type "history", I get the list of all the commands that I have executed.
I want to know where is the history been stored (any path location ?)
Secondly,if I want to delete the history or some part of the history, can... (9 Replies)
Discussion started by: shubhranshu
9 Replies
2. UNIX for Advanced & Expert Users
Team ,
using fc command we can get details of our history file .. Is it possible to get the same result for different user from root.. Actually I need to collect all the stuff from select users history file for day to day basis.
thanks in advance .. (2 Replies)
Discussion started by: rgpai9972
2 Replies
3. UNIX for Dummies Questions & Answers
How do I pipe serveral commans that will list only the user ids, sort the output, and remove any duplice name entries for those that have logged in in the past month? Thanks! (1 Reply)
Discussion started by: CasperQuiet
1 Replies
4. Shell Programming and Scripting
Hi,
I need to access a user's command history. However, the dilemma is that he is logged in and so his current history is not yet flushed to .bash_history file which gets flushed when he logs out. Is there a way I can still access his most recent history?
thank you,
S (4 Replies)
Discussion started by: sardare
4 Replies
5. Solaris
Hi
We are sharing our envoirnment with our component teams. the plateform is SunOS 5.8 Generic_117350-41 sun4u sparc SUNW,Sun-Fire-V490.
All team logs in the domain with same user and perform activities.
Now for the system auditing purpose can somebody guide me how can I get the details when... (6 Replies)
Discussion started by: sukhvinder_Tm
6 Replies
6. UNIX for Advanced & Expert Users
Hi all,
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :
a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies
7. Shell Programming and Scripting
Is it possible to find out the history of recently typed in commands of a particular user in a multi user system?
the history command expects a numeric argument with it. is it possible to find out the history o commands of a particular user say John_smith for example? (2 Replies)
Discussion started by: arindamlive
2 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :
a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies
LEARN ABOUT REDHAT
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 ... ]
[ --strict-match ]
[ -f filename | --file filename ]
[ --user name ] [ --command name ] [ --tty name ]
[ --debug ] [ -V | --version ] [ -h | --help ]
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 a.out root 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 exited
OPTIONS
--strict-match
Print only entries that match *all* of the arguments on the command line.
--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.
-f filename, --file filename
Read from the file filename instead of acct
--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.
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)