You can access your history file by adding set -o vi to your .kshrc file if you are using the korn shell. This can also be typed at the command line. After this option is set you can hit the escape key and then the k key. You should be able to access 128 of you previously used commands this way. Hope this helps!
You can specify how many commands are kept by using the HISTSIZE environment variable. The default for this variable is 128. You can set this variable in your .profile if you wish to change it, I'm not sure how to make it unlimited. Your .sh_history file stores these commands and could grow VERY large in a short period of time, you might want to keep an eye on this. Hope this helps. <p>Christopher Devenny<br><a href=mailto:c_devenny@yahoo.com>c_devenny@yahoo.com</a><br><a href= > </a><br>
You need to do this to use the command history in your Korn Shell:<br><br>edit your .profile and add the line<br><br>export ENV=~/.kshrc<br><br>edit your .kshrc (or create it if it doesn't exist yet) and add the line<br><br>set -o vi<br><br>When you re-login you can use the command recall functions first pressing the Escape key and then you can use<br><br>k to go to the previous line<br>j to go to the next line if it exists<br>h or backspace go to left<br>l or space to go right<br>i to insert at cursor position<br>dd to delete a line<br>Enter to reexecute<br><br>etc, these are the vi editing keys if you know.<br><br>If you put set -o vi in your .profile your lose this functionality in your child shells.<br><br>I hope it works<br>Ramon Barrios Lascar RamonBarrios AT uol.com.co
Also note that the .sh_history file will record all commands entered for all sessions on that user so that if any other people log on with the same user then their commands are will be recorded as well. <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
I fogot to add, if you do have to use a group user you can declare your own history file using the HISTFILE variable. <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.