Language Selection

English French German Italian Portuguese Spanish

Repeat last shell command that started with a particular word

Filed under
HowTos

Bash / CSH shell offers command history feature. Most of you may be aware and using of UP / DOWN arrow keys to recall previous commands. History expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous ommand into the current input line, or fix errors in previous commands quickly.

To repeat last command that started with bar word type i.e. refer to the most recent command starting with string bar):

More Here.




More in Tux Machines

Today in Techrights

Fedora 26 Linux Might Ship with an LXQt Flavor, Won't Replace the LXDE Spin

There's a new self-contained change planned for the upcoming Fedora 26 Linux distribution, due for release on June 6, 2017, namely a new flavor built around the lightweight, Qt-based LXQt desktop environment. Read more

Devil-Linux 1.8.0 to Be a Major Overhaul, Will Use SquashFS as Main File System

It's been seven months since we last heard something from the developers of the Devil-Linux project, which produces a tiny, dedicated server distribution for many applications, and a new development version of the upcoming 1.8 stable series is out. Read more

CentOS vs Ubuntu: Which one is better for a server

Finally decided to get a VPS but can’t decide which Linux distro to use? We’ve all been there. The choice may even be overwhelming, even for Linux distros, considering all the different flavors and distros that are out there. Though, the two most widely used and most popular server distros are CentOS and Ubuntu. This is the main dilemma among admins, both beginners and professionals. Having experience with both (and more) distros, we decided to do a comparison of CentOS and Ubuntu when used for a server. Read more