openmic.social is an uncensored community. You may encounter strong language, controversial opinions, and mature or NSFW material. You must be 18+ to browse. Illegal content is prohibited and removed on sight — please report it. By continuing, you accept that you may see content you personally disagree with.
To add,
!$ gets replaced with the last word from the previous command line
!! Repeats the most recent command
!-N Repeats the Nth previous command
!string Repeats the most recent command that began with ‘string’
I just learned more about Linux than I did from my whole IT degree.
You learned more about shells than you knew. This stuff works on BSD and some UNIX systems too, you know
Most POSIX-compliant systems?
I learned Ubuntu in uni decades ago, and I didn’t know those commands exist.
!!is the goat when you needed to run the last command usingsudoHot damn, and here’s me thinking thefuck was the way to do this.
💯
If
!$isn’t pronounced “ba-ching!” I’m quitting LinuxBetter than “bang-ching” which sounds racist to me. lol
Great, now omarchy is going to adopt it
the (ng) is silent when used in compound punctuation in ba(ng)
okay, but now THAT sounds racist for whole OTHER reasons… ;-)
it probably is, that professor who taught me it was belgian
!!:nwhere n is the nth word after the command in your last linecp file1 file2 nano !!:2Here nano opens file2.
Love it
… How have I used Linux for two decades and not run into this once. Amazing stuff
I’ve never come across this before, and I am completely unsurprised it exists.
I’m loving this
Huh - TIL about !-N
Thanks 🙏