Sponsored Content
Full Discussion: which user ran which command
Top Forums Shell Programming and Scripting which user ran which command Post 302364512 by narang.mohit on Friday 23rd of October 2009 08:30:46 AM
Old 10-23-2009
which user ran which command

can we come to know all the command ran bya user for last 1 day
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

root user command in shell script execute as normal user

Hi All I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh URL="www.google.com" VBURL="10.5.2.211" echo "Setting route for $URL for GPRS" URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1` echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies

2. HP-UX

Aaarrggghhh HP warranty ran out

We have HP 9000 running UX. Does anybody know a reputable or even a strong maintenance firm that DOESN'T have a help desk the other side of the planet? We've been approached by Newcorp but thay seem rubbish. Please give me some recommendations. Sorry if this is posted in the wrong room but I... (3 Replies)
Discussion started by: Handsy
3 Replies

3. UNIX for Advanced & Expert Users

grep -v *[^:] Why did this repeat a command i ran earlier today?

I ran grep -v * trying to reverse grep a word before a colon, and discovered it runs a command I had run earlier today. Why? (3 Replies)
Discussion started by: glev2005
3 Replies

4. Shell Programming and Scripting

Identify if ran by su or sudo?

Recently I was on an operational call and heard the people running my code placing the code in the /tmp directory and running as root. I had not planned on that. So I want to add some checks to my code (using ksh93): # ---------- ---------- ---------- # root not allowed to run this #... (3 Replies)
Discussion started by: ericdp63
3 Replies

5. UNIX for Dummies Questions & Answers

Find hangs when ran under superuser.

When I ran the following find command under a "regular" user is completes but it limited because of perms. find / -name "*.*" | xargs grep something > ok But when I try to run it under su, it hangs and never completes. Any suggestion? (4 Replies)
Discussion started by: shorty
4 Replies

6. AIX

IBM AIX ran into error u0.1-p1-v2

Hi Guys, Is there any one can help me with the below error message dispalys on the LED panel. 10112633 u0.1-p1-v2 I bought a second hand IBM 7029 6C3 online several days ago. On the fist day, it can be ran well. but on second day, when i tried to boot up the machine, after few mins, the... (2 Replies)
Discussion started by: andylai
2 Replies

7. Shell Programming and Scripting

how to find whether a script ran or not

Hi, I have written a script and placed in an application and the script can be executed manually only. But somehow one of the method in the script is being called and bringing the application down. But we are not able to find any instance of script running. Is there a way to findout whether the... (1 Reply)
Discussion started by: Satyak
1 Replies

8. UNIX for Dummies Questions & Answers

Test if script was ran w/ nohup

I want to test if script.sh is being run with nohup ... but $0 does not contain nohup part... purpose: script.sh should only be ran with nohup if user forgets nohup then it should echo "run with nohup" && exit....... (2 Replies)
Discussion started by: holyearth
2 Replies

9. Shell Programming and Scripting

Checking if command ran in parallel

Hi, I am running below code For I in $var do .......some line of code....... nohup Sqlplus apps/apps <<EOF & My_proc($I) Exit EOF done Nohup and & is used for parallel processing. Can someone help in determining if the procedure with different arguments Was called paralley or... (3 Replies)
Discussion started by: Pratiksha Mehra
3 Replies

10. UNIX for Dummies Questions & Answers

How many times did the scipt ran?

Hi, Can we able to identify how many times any script was ran per day/week/month/year wise (2 Replies)
Discussion started by: penqueen
2 Replies
LASTCOMM(1)						    BSD General Commands Manual 					       LASTCOMM(1)

NAME
lastcomm -- show last commands executed in reverse order SYNOPSIS
lastcomm [-f file] [command ...] [user ...] [terminal ...] DESCRIPTION
lastcomm gives information on previously executed commands. With no arguments, lastcomm prints information about all the commands recorded during the current accounting file's lifetime. Option: -f file Read from file rather than the default accounting file. If called with arguments, only accounting entries with a matching command name, user name, or terminal name are printed. So, for example: lastcomm a.out root ttyd0 would produce a listing of all the executions of commands named a.out by user root on the terminal ttyd0. For each process entry, the following are printed. o The name of the user who ran the process. o Flags, as accumulated by the accounting facilities in the system. o The command name under which the process was called. o The amount of cpu time used by the process (in seconds). o The time the process started. o The elapsed time of the process. The flags are encoded as follows: ``S'' indicates the command was executed by the super-user, ``F'' indicates the command ran after a fork, but without a following exec(3), ``C'' indicates the command was run in PDP-11 compatibility mode (VAX only), ``D'' indicates the command terminated with the generation of a core file, and ``X'' indicates the command was terminated with a signal. FILES
/var/account/acct Default accounting file. SEE ALSO
last(1), sigaction(2), acct(5), core(5) HISTORY
The lastcomm command appeared in 3.0BSD. BSD
December 22, 2006 BSD
All times are GMT -4. The time now is 08:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy