- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Command History
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
Forums
Discussions
Discussions
Forums
Discussions
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
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
10-12-2005 08:54 PM
10-12-2005 08:54 PM
Command History
How can I get the command history by pressing UP key or others?
I connect to the OVO server by Reflection X,does it work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2005 08:56 PM
10-12-2005 08:56 PM
Re: Command History
Do find it then,
in shell prompt,
# echo $SHELL
if it is ksh then,
use as,
#
#
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2005 08:57 PM
10-12-2005 08:57 PM
Re: Command History
esc k gives you the last command
history gives you (by default) the last ten commands.
history -n gives you the last n commands: e.g. history -20 gives you 20 commands.
The output will be similar to this:
121 cd
122 ll
You can then run r 121 to repeat the cd command.
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2005 08:58 PM
10-12-2005 08:58 PM
Re: Command History
# history (in shell prompt)
If it is showing then no problem.
Else,
# export -o vi
# export HISTFILE=$HOME/.sh_history
# export HISTSIZE=2500
in command line or put it in,
$HOME/.dtprofile file
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2005 11:24 PM
10-12-2005 11:24 PM
Re: Command History
http://hpux.connect.org.uk/hppd/hpux/Shells/bash-3.00.16/
or, in KSH, you have to enable history option in your .profile
export -o vi
export HISTFILE=$HOME/.sh_history
-Arun