Searching shell history
Searching Shell History
You can search for commands in your history, to start a reverse shell history search, type Ctrl + r. Your prompt changes to reflect that you are performing a search. Start typing in characters from the previous command that you are searching for. If the first result returned is not what you are looking for, type Ctrl + r again to get the next previous match. To execute the command as it is, simply press the Enter key. If you want to modify the command before executing it use the ← and → arrow keys to start navigating the command line. Make your changes, and type Enter to execute the command. To cancel your search and return to the prompt type Ctrl + g
Examples
Example 1: Perform reverse searchTo perform a reverse search, enter Ctrl + r, then you will see that the prompt changes to say you are performing a reverse search.
(reverse-i-search)`':
Then, simply type what you would like to search. If the one is not you are looking for, you can use Ctrl + r again to get the next previous command. To execute the searched command, simply press Enter key. To change command, use ← and → arrow keys. To cancel a reverse search, use Ctrl + g.
References & Resources
- N/A
Latest Post
- Dependency injection
- Directives and Pipes
- Data binding
- HTTP Get vs. Post
- Node.js is everywhere
- MongoDB root user
- Combine JavaScript and CSS
- Inline Small JavaScript and CSS
- Minify JavaScript and CSS
- Defer Parsing of JavaScript
- Prefer Async Script Loading
- Components, Bootstrap and DOM
- What is HEAD in git?
- Show the changes in Git.
- What is AngularJS 2?
- Confidence Interval for a Population Mean
- Accuracy vs. Precision
- Sampling Distribution
- Working with the Normal Distribution
- Standardized score - Z score
- Percentile
- Evaluating the Normal Distribution
- What is Nodejs? Advantages and disadvantage?
- How do I debug Nodejs applications?
- Sync directory search using fs.readdirSync