DEV Community

Discussion on: Helpful Terminal Commands for Beginners!

Collapse
 
zeddotes profile image
zeddotes

! is pretty cool when used with history. If you enter history, you could use the reference number for any command from the list, and reuse it by doing: !123, where 123 is the number. Also, you could pipe history (e.g, history | grep sudo to find all commands in history with sudo).