- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 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
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
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
тАО11-19-2003 06:15 PM
тАО11-19-2003 06:15 PM
Command History
Is it possible in HP Unix ? I am new to unix so pls give complete procedure.
Thanks/Regards,
Ketan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 06:19 PM
тАО11-19-2003 06:19 PM
Re: Command History
You have to set two things.
HISTFILE=$HOME/.sh_history
HISTFILESIZE=3000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 06:32 PM
тАО11-19-2003 06:32 PM
Re: Command History
export HISTFILE=$HOME/.sh_history
export HISTFILESIZE=9000
The recall functions will be dependent on your shell. If you are using the POSIX sh that comes with HP-UX by default, at the command prompt you hit escape "k" (no quotes) then keep hitting "k" to scroll through the history. You can also type history at the prompt to view the history of commands. In addition, there will be a ~/.sh_history file with your history of commands in it.
You can also search through the history by hitting the / key after you hit esc-k the first time. Just type a part of a word you've typed before and it will search your history and bring up the closest match.
Hope this helps
-Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 07:27 PM
тАО11-19-2003 07:27 PM
Re: Command History
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=264348
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 08:19 PM
тАО11-19-2003 08:19 PM
Re: Command History
If you type in the command "history" you will be shown the most recent 10 commands. If you want more you can type (e.g.) "history -20" to see the most recent 20 commands. If you want to see so many commands they scroll off the top of the page you would write (e.g.) "history -50|pg".
There are then three ways you can select a command to repeat:
1. Each command will have a number next to it. If you want to repeat command number 123 you would type "r 123".
2. If you wanted to repeat the most recent command that started with the letter p you would type "r p". Please note that you can use more than one letter: if the most recent command that started with p was ps and you wanted to repeat a pg command you could write "r pg".
3. r on its own repeats the last command.
The "escape k" method suggested earlier has the advantage that you can edit the line (especially useful if you made a typo in a long line of text). You cannot edit with "r".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 08:53 PM
тАО11-19-2003 08:53 PM
Re: Command History
the following actions should satisfy your request:
export HISTFILE=$HOME/.sh_history
export HISTFILESIZE=1000
set -o vi
Also another change is needed. When you login in CDE you should uncomment the following line in $HOME/.dtprofile of user:
DTSOURCEPROFILE=true
Default it is commented.
I hope this helps you.
Bets regards,
Ettore