Pantherina@feddit.de to linuxmemes@lemmy.world · 10 months agostolen from floss@hispanilandia.net XMPP channelfeddit.deimagemessage-square23fedilinkarrow-up1454arrow-down110file-text
arrow-up1444arrow-down1imagestolen from floss@hispanilandia.net XMPP channelfeddit.dePantherina@feddit.de to linuxmemes@lemmy.world · 10 months agomessage-square23fedilinkfile-text
minus-squareRin@lemm.eelinkfedilinkarrow-up33·10 months agoSo, yk how the history command outputs something like this: 1 Abcd 2 Efgh 3 Ijkl If you run !2, you will run Efgh. It blew my mind the first time I saw it, but maybe I’m just stupid.
minus-squareXEAL@lemm.eelinkfedilinkarrow-up17·10 months agoI actually use quite frequently "sudo !!“, but I didn’t know the details of why it worked… Now I see more sense in using the history command, specially combined with grep.
minus-squareplatypus_plumba@lemmy.worldlinkfedilinkarrow-up2·9 months agoSame here, I just assumed it was a special thing that saved the last command. Had no idea it was actually a query to the history
minus-squarertxn@lemmy.worldlinkfedilinkEnglisharrow-up2·10 months agoLearn some more: https://www.youtube.com/watch?v=sXx7b0uCWkk
minus-squarePipedLinkBot@feddit.rocksBlinkfedilinkEnglisharrow-up3·10 months agoHere is an alternative Piped link(s): https://www.piped.video/watch?v=sXx7b0uCWkk Piped is a privacy-respecting open-source alternative frontend to YouTube. I’m open-source; check me out at GitHub.
So, yk how the history command outputs something like this:
If you run
!2
, you will runEfgh
.It blew my mind the first time I saw it, but maybe I’m just stupid.
I actually use quite frequently "sudo !!“, but I didn’t know the details of why it worked…
Now I see more sense in using the history command, specially combined with grep.
Same here, I just assumed it was a special thing that saved the last command. Had no idea it was actually a query to the history
TIL
Learn some more: https://www.youtube.com/watch?v=sXx7b0uCWkk
Here is an alternative Piped link(s):
https://www.piped.video/watch?v=sXx7b0uCWkk
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I’m open-source; check me out at GitHub.