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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT SUNOS
lastcomm
lastcomm(1) User Commands lastcomm(1)
NAME
lastcomm - display the last commands executed, in reverse order
SYNOPSIS
lastcomm [-f file] [-x] [command-name] ... [user-name] ... [terminal-name] ...
DESCRIPTION
The lastcomm command gives information on previously executed commands. lastcomm with no arguments displays information about all the com-
mands recorded during the current accounting file's lifetime. If called with arguments, lastcomm only displays accounting entries with a
matching command-name, user-name, or terminal-name. If extended process accounting is active (see acctadm(1M)) and is recording the appro-
priate data items, lastcomm attempts to take data from the current extended process accounting file. If standard process accounting is
active, lastcomm takes data from the current standard accounting file (see acct(2)).
If terminal-name is `- -', there was no controlling TTY for the process. The process was probably executed during boot time. If terminal-
name is `??', the controlling TTY could not be decoded into a printable name.
For each process entry, lastcomm displays the following items of information:
o The command name under which the process was called.
o One or more flags indicating special information about the process. The flags have the following meanings:
F The process performed a fork but not an exec.
S The process ran as a set-user-id program.
o The name of the user who ran the process.
o The terminal which the user was logged in on at the time (if applicable).
o The amount of CPU time used by the process (in seconds).
o The date and time the process exited.
OPTIONS
The following options are supported:
-f file Uses file as the source of accounting data. file may be either an extended process accounting file or a standard process
accounting file.
-x Uses the currently active extended process accounting file. If extended processing accounting is inactive, no output will
be produced.
EXAMPLES
Example 1: Listing executions of named commands
The command
example% lastcomm a.out root term/01
produces a listing of all the executions of commands named a.out by user root while using the terminal term/01.
Example 2: Listing all user commands
The command
example% lastcomm root
produces a listing of all the commands executed by user root.
FILES
/var/adm/pacct standard accounting file
/var/adm/exacct/proc extended accounting file
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
SEE ALSO
last(1), acctadm(1M), acct(2), acct.h(3HEAD), sigvec(3UCB), core(4), attributes(5)
SunOS 5.10 10 Jan 2000 lastcomm(1)