How to save all the command typed -urgent


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to save all the command typed -urgent
# 1  
Old 09-21-2006
How to save all the command typed -urgent

hi
I want to know how to save all the command used by all the used under a particular root with the time stamp in a file.
Eg:
User Name: UX10
Time: 10:56
Command: LS

User Name: UX23
Time: 10:59
Command: MORE abc.txt

Please do help.

thanks and regards
-Anand
# 2  
Old 09-21-2006
i hope this helps...

There is a file called
/home/user/.bash_history

That contains last 1000 commands executed in a shell. So you can run a script after every 1 hr(or maybe 10mins) to get all the new updates of the file(i am not sure how to do that but i am sure it can be done Smilie )

I hope this helps....do let us know
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Save value from output of Corestat and save in a list for each core

I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below: Core Utilization CoreId %Usr %Sys %Total ------ ----- ----- ------ 5 4.91 0.01 4.92 6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies

2. Shell Programming and Scripting

save the return value of a unix command

Hi all, I am new in linux script, and I have the code below #!/bin/bash CMD="shuf -i 1-5 -n 1" $CMD echo $CMD exit 0 if I run the $CMD, it will return me a shuffle value. However, I need to save the return value of the shuffle, and use it later on. I tried for example print the... (3 Replies)
Discussion started by: peuceul
3 Replies

3. Shell Programming and Scripting

how to save command into a file in linux

Hi Can anyone suggest how i can save a command into a file. i am trying to execute couple of put commands which i want to write into a file. example below put sample.dat abcd@server.com put sample1.dat abcd@server.com . . . tried cat but no luck Please suggest how i can do... (1 Reply)
Discussion started by: ramkiran77
1 Replies

4. Shell Programming and Scripting

how to save an output of a command in a variable

Hi, in shell script, i have the command swstart -p which returns an output. i want to store the output of this command into a variable. how i can do that excerpt from the script #!/usr/bin/ksh # # # # Program: swstart -p # # Description: Starts the sentinels on Slave server ... (4 Replies)
Discussion started by: lookinginfo
4 Replies

5. AIX

"/" doesn't work on command prompt for searching commands last typed

When I use "/" to look for a particular command that I typed in the current session it says D02:-/home/user1/temp> /job ksh: /job: not found. D02:-/home/user1/temp> previously it used to fetch all the commands which had job in it.. for example subjob, endjob, joblist etc... may I... (7 Replies)
Discussion started by: meetzap
7 Replies

6. UNIX for Dummies Questions & Answers

the command to save session

I remember there is a command you can type and it records everything you type on after it...anybody can help a bit? (2 Replies)
Discussion started by: fedora
2 Replies

7. UNIX for Dummies Questions & Answers

how to save the output of command in tcl/expect

hi, everyone: I just wonder how to save the output of command, I mean everything, save as a string into a variable. another question is I try to ls the details of a directory, but it works in the shell, not in the script. for example code: ls -ltr *se100* | grep ^- | tail -1 | awk '... (1 Reply)
Discussion started by: allenxiao7
1 Replies

8. HP-UX

View command was typed

Hello All, I Am A New Member To This Group. Could you show me how to view all command was typed the same Redhat. Every I type arrow up and down to show the command was type but nothing to see. I must type it again. it is very slow. Thanks hoavn (4 Replies)
Discussion started by: hoavn
4 Replies

9. UNIX for Advanced & Expert Users

i am not able to recall the command typed earlier in unix

i am not able to recall the command typed earlier in unix whenever i press esc key ^[ comes on the unix prompt . so esc k isnt working for me whenever i press backspace key i get ^H on my unix cursor need help (1 Reply)
Discussion started by: murli1200
1 Replies

10. UNIX for Dummies Questions & Answers

How to retrieve the typed command

For examples, I have typed 4 commands in the command prompt: ls -la rm -rf /home/user1 du -k /home find . -name "abc.out" -print And now I want to retrieve the command which begin with letter "r" (i.e. rm -rf /home/user1), what can I do? (5 Replies)
Discussion started by: laum
5 Replies
Login or Register to Ask a Question