Play with Shell History
Introduction
This section covers the shell history, how to repeat commands. Or portions of commands with Exclamation Mark Syntax, and how to use Autocompletion.
Shell History
Each command you enter into the shell is recorded in your shell history, having access to your shell history is extremely useful. You can search through your shell history, repeat commands that you've previously entered. And even recall previous commands, and change them slightly before executing them again. Not only can this save your time in keystrokes, but it can prevent you from making mistakes by running a previously known, good command.
Some shells like bash keep their history in memory, and only write the history to a file on exit. Common history files include .bash_history, .history and .histfile. These history files are stored in your home directory.
- ~/.bash_history
- ~/.history
- ~/.histfile
The details of history
and !
commands are covered in shell history and tab completion.
Searching Shell History
You can search for commands in your history, to start a reverse shell history search, type Ctrl + r. The details of search shell history is covered in search shell history.
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