ee_lcpaa
asked on
Check Commands Run in the past
Hi All,
Under Solaris 8, besides checking the file .sh_history, is there another way to check the commands run in the past?
Please advise. Thanks.
Under Solaris 8, besides checking the file .sh_history, is there another way to check the commands run in the past?
Please advise. Thanks.
what shell are you using? if sh or csh or tcsh then no way.
omarfarid, they will be using ksh, as .sh_history was mentioned.
I could see that, thanks.
I just wanted to mention that it can not be done with those shells
I just wanted to mention that it can not be done with those shells
ASKER
Hi omarfarid,
Yes, I'm using ksh.
So, do you mean that there is another way if I am using ksh. Please advise. Thanks.
Yes, I'm using ksh.
So, do you mean that there is another way if I am using ksh. Please advise. Thanks.
The history command works in
ksh
csh
tcsh
zsh
bash
The only shell that doesn't have history feature is bourne shell.
ksh
csh
tcsh
zsh
bash
The only shell that doesn't have history feature is bourne shell.
What Tintin mentioned about shells is correct. But, the history command in csh and tcsh will give you list of used commands for that login session only, while in ksh and bash it will give previously used commands in previous logins as well.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
history