Linux Tech Enthusiast
Feb 14, 2026 · Operations
8 Surprising Ways to Use the ‘!’ Operator in Linux Commands
This article explores eight practical uses of the ‘!’ history‑expansion operator in Linux shells, covering numbered command recall, negative indexing, argument reuse, multi‑parameter handling, keyword‑based recall, repeat‑last‑command shortcuts, selective file deletion, and directory‑existence checks, each illustrated with concrete examples.
Command Linebang operatorbash
0 likes · 10 min read
