- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: command history recall
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
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
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
тАО02-26-2003 06:05 AM
тАО02-26-2003 06:05 AM
command history recall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2003 06:15 AM
тАО02-26-2003 06:15 AM
Re: command history recall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2003 06:22 AM
тАО02-26-2003 06:22 AM
Re: command history recall
To configure history function, please do following:
# vi .profile
...
HISTSIZE=500
HISTFILE=.sh_history
export HISTSIZE HISTFILE
EDITOR=vi
export EDITOR
# touch $HOME/.sh_history
After re-read the .profile you should be able to get the history function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2003 06:25 AM
тАО02-26-2003 06:25 AM
Re: command history recall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2003 09:54 AM
тАО02-26-2003 09:54 AM
Re: command history recall
HISTFILE=${HOME}/.sh_history
Then make sure the file is created
touch ${HOME}/.sh_history
Keep in mind, this history recall is for sh and ksh only. If you are using csh, you recall history using '!'.
Good Luck.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2003 10:18 AM
тАО02-26-2003 10:18 AM
Re: command history recall
csh
and then yo can view the history with the history command.
To repeat the last command just type !!, and to repeat another one just type !n, when n is the number showed in the history command.
Frank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2003 06:51 AM
тАО02-27-2003 06:51 AM
Re: command history recall
You may put the same in profile.
-Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2003 08:31 AM
тАО02-27-2003 08:31 AM
Re: command history recall
check your login shell
'env|grep SHELL'
If you have csh it will work like Francisco told, if you have ksh it should work like discribed above.
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2003 08:41 AM
тАО02-27-2003 08:41 AM
Re: command history recall
EDITOR=vi; export EDITOR
also, make sure you are the owner of the .sh_history file and read/write permissions are set for the owner.
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2003 03:36 PM
тАО02-27-2003 03:36 PM
Re: command history recall
set -o vi
I'm not sure quite what the interaction is between setting the EDITOR=vi variable, and using the 'set -o vi' command, I have both in my .profile (too superstitious to leave either out). But, as I recall, the 'set' command was what did the trick to get
One point about the
Other vi functions work when you are in 'vi mode', such as a '/' to search back through your command history, rather than just going back sequentially, etc. All your favorite 'vi' functions, like 'cw' to change a word, or 'dw' to delete a word, can be used once you hit
I couldn't live without it, and it is one of the first things I get set up, when I have to work on a unix system that doesn't do this... which poses a bit of a problem on Solaris, or Linux, where setting this up is different.
Hope it helps... --bmr