Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

increasing history

Status
Not open for further replies.

mdraja

Programmer
Oct 14, 2003
44
GB
Hi

Does anyone know how to increase the number of returns you get when u type "history". Currently, only 15 are being returned

Also, when you use "set -o vi", I can't recall all the commands in the .sh_history file of the user. Does anyone know how to recall the first ever command used (eg) if the first command was "1 Hello Peeps", I can't get it from typing "Esc"+"/"+"1" and nothing is returned if there are hundreds of entries in .sh_history.

Thanks in advance
 
Try export HISTSIZE=<value> in your $HOME/.profile

To search for a command in the .sh_history try the usual vi method (/)

HTH.
 
your keystroke should find the first (backwards) command with a "1" but if it has rolled off the top end of the history file then you are out of luck. my HISTSIZE is 2048, for example, so after running 2049 commands i can't get that first one again.

IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top