- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: HP-UX enable history command navigation
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2011 10:57 PM
03-22-2011 10:57 PM
does it is not supported by hpux v11.11??
thanx for the help!
Solved! Go to Solution.
- Tags:
- history
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2011 11:05 PM - last edited on 07-12-2011 11:22 AM by Kevin_Paul
03-22-2011 11:05 PM - last edited on 07-12-2011 11:22 AM by Kevin_Paul
SolutionRefer the below similar threads.
http://h30499.www3.hp.com/t5/General/Enabling-arrow-keys-for-history-recall/m-p/3308853#M96703
Rgds...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2011 11:06 PM
03-22-2011 11:06 PM
Re: HP-UX enable history command navigation
if you are using sh, esc+k combination gives you history.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2011 11:12 PM
03-22-2011 11:12 PM
Re: HP-UX enable history command navigation
Shibin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2011 05:23 AM
03-23-2011 05:23 AM
Re: HP-UX enable history command navigation
This is not an OS question, it is a question concerning the shell you are using. By default, you are probably using the POSIX shell (/usr/bin/sh), or possibly the Korn shell (/usr/bin/ksh). There are two requirements to enable the shell history:
touch $HOME/.sh_history
and export these variables in /etc/profile:
export HISTFILE=$HOME/.sh_history
export HISTSIZE=20000
export EDITOR=/usr/bin/vi
Now exit and login again. Type a command like pwd and then type the command: history. The history command shows your current history file. You recall the last command by type ESC then k. You can search for the most recent command containing a string using ESC /.
Some user may be accustomed to EMACS style recall so they can change that in their personal .profile file. Arrow keys are not functional in the POSIX and ksh shells.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2011 12:24 AM
03-28-2011 12:24 AM
Re: HP-UX enable history command navigation
Certain things are in built to the K-shell and as Bill mentioned you have to add those three lines for command line history on a POSIX shell that would be /usr/bin/sh or /sbin/sh. You may also try esc and then j if you have crossed the command you wanted to execute , in other words forward... Esc Esc also allows for file name completion. As you see, there are reasons why people prefer bash!
Regards
Ismail Azad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2011 01:59 AM
03-28-2011 01:59 AM
Re: HP-UX enable history command navigation
If you only want arrow-key history navigation in ksh, you can set emacs mode in your profile:
set -o emacs
and have these lines also added to your .kshrc :
alias __A='^P'
alias __B='^N'
alias __C='^F'
alias __D='^B'
alias __H='^A'
alias __P='^D'
Let me know if it worked, it should!
Unix operates with beer.