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
)
I hope this helps....do let us know
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. UNIX for Advanced & Expert Users
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
3. HP-UX
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
4. UNIX for Dummies Questions & Answers
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
5. UNIX for Dummies Questions & Answers
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
6. AIX
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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