Been using UNIX since the late 80s; Linux since the mid-90s; virtualization since the early 2000s and spent the past few years working in the cloud space.
Location
Alexandria, VA, USA
Education
B.S. Psychology from Pennsylvania State University
If you know the command you're trying to repeat, then !<starting-string> is great. Similarly, if you know the command you're trying to repeat, but you need to modify it, !<starting-string>:s/<SEARCH>/<REPLACE> or even !<starting-string>:gs/<SEARCH>/<REPLACE> are freaking awesome.
Note: This type of advanced command-history usage works in BASH and CSH-derived shells. Dunno about other shell-families.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you know the command you're trying to repeat, then
!<starting-string>
is great. Similarly, if you know the command you're trying to repeat, but you need to modify it,!<starting-string>:s/<SEARCH>/<REPLACE>
or even!<starting-string>:gs/<SEARCH>/<REPLACE>
are freaking awesome.Note: This type of advanced command-history usage works in BASH and CSH-derived shells. Dunno about other shell-families.