Guides 11791 Published by

The Geek Stuff published 15 Linux bash history expansion examples you should know



Bash history is very powerful. Understanding how to effectively use the bash history expansions will make you extremely productive on the Linux command line.

This article explains 15 examples that uses the following bash history expansion features:

Event designators – Refers to a particular command in the history. It starts with a !
Word designators – Refers to a particular word of a history entry. Typically this gets combined with an even designator. Even designators and word designators are separated by a colon
Modifiers – Modifies the result of the substitution done by the event or word designators
  15 Linux Bash History Expansion Examples You Should Know