how to see which command has been executed ?
I am running couple of shell script like below..
Now i want to fire a command which could tell me what are the shell scripts has been executed .
so my expected output is :
I am looking for some linux command which will give the history.
whats that ?
is the command which gives us the history of commands executed in the system
The history command will list previous commands. You can also search within history if you know roughly what you're looking for. ie. If you want to find a list of all the cp commands you have executed then type history | grep cp. Previous commands are stored in bash_history, the number of commands that can be stored is controlled by the HISTSIZE variable. Type echo $HISTSIZE to see what this variable has been set to. You can change this from the commandline by typing HISTSIZE=500 for example.
If you started your scripts in the background and they're still running, then the "jobs" command will list those.
Setting HISTSIZE to 0 will effectively disable the history.
Please also note that the history mechanism can vary depending on the shell you're using. So check your shell's man pages to be sure.
from the bash manual page (yes, it's really really useful - you should read it!)
|All times are GMT -5. The time now is 11:23 PM.|