- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Question about shell commands
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
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
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-23-2000 11:01 PM
11-23-2000 11:01 PM
I have a very little question about shell commanding:
I found, that I can use some commands from the command history by using esc+k. Now I'm searching for a command, and then I have to type very often k,k,k,k... . So what I'm looking for is, to give the first two or three digits from the command, and then to find it faster. How can I do that?
And how can I increase the history length?
Thank you for your reply!
Daniel :-)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2000 11:18 PM
11-23-2000 11:18 PM
Re: Question about shell commands
Esc+k is very usefull. After this you can use vi-commands to search in your command history.
So, type '/' and a part of the command you are looking for, and press enter. When you need the next command, just type 'n' (next).
The history can be increased by setting the variable HISTSIZE in your .profile. For example, 'export HISTSIZE=5000'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2000 11:19 PM
11-23-2000 11:19 PM
Solution[ESC]K
/
increase history with setting the variable HISTZISE ie:
HISTSIZE=500 ; export HISTSIZE
insert this into /etc/profile or $HOME/.profile
(the default for HISTSIZE is 128)
For more information see
man sh-posix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2000 11:39 PM
11-23-2000 11:39 PM
Re: Question about shell commands
You can also use [ESC]z and /
If you know your 'vi' you also know that when typing 'n', a ? (question mark) reverses the search direction. Good if you passed by the command you were looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2000 11:51 PM
11-23-2000 11:51 PM
Re: Question about shell commands
Nearly everything has been said before but another useful key to know is 'N'
If after having searched for a command containing a string, typed a few times 'n' for the preceeding occurence, typing 'N' will back to the previous one. Useful if you're typing too fast like most of us ;-)
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2000 11:58 PM
11-23-2000 11:58 PM
Re: Question about shell commands
>lpstat -t
>cd somewhere
>vi something
>man command
After this you can recall the lpstat command with:
>r lps
But you have to use the beginning of the command (as far as i know).
Hope this helps also.
Regards
Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 12:40 AM
11-24-2000 12:40 AM
Re: Question about shell commands
Your comments are very helpful.
Best regards
Daniel :-)