Ctrl + R is bash history search
120ReplyKeep hitting CTRL+R until you find it and you can hit CTRL+S to scroll forward if you went past it 👌
44ReplyI've used ctrl R for 20 years.
Now I learn of ctrl S. This is a blessed day!
52ReplyOr CTRL+SHIFT+r, CTRL+s just pauses my terminal output, you can unpause it with CTRL+q
5Reply
I feel dirty for still using
history | grep ls
lol 21ReplyI usually alias that to "bastard", I agree with a very dirty feeling.
3ReplyWhat if
history
only shows the last 10-15 entries? You might have to actually type the location of the history file or find out ifhistory
has any command line switches. (Does it have any switches? Dunno.)Edit: I think CIS Benchmarks recommended limiting bash history. Regardless, I have seen some installations that only show an abbreviated bash history by default.
2Reply
Ctrl + R ls
14ReplyThat sounds an aweful lot like typing to me
14ReplyUse fzf for an improved experience!
8ReplyI prefer to just speak to my computer instead of using a keyboard. The computer doesn't respond but maybe one day
4Reply 5ReplyA speech operated terminal would be possible, speech to text is pretty well developed by now, shouldn't be too hard to hook that up to a terminal.
But, y'know, effort.
3Reply
You can Ctrl+R, type "ls", then keep hitting Ctrl+R until you find one without arguments if you need them. Efficiency at its finest.
55ReplyI usually bind it to my up arrow. Means I can still keep tapping up ;)
9ReplyThank you for this
8Reply
If people are going to make comics about me, they could at least let me know.
52ReplyWe tried telling you.
Maybe if you stopped screaming every time we tried, but nooo, SOMEONE has to have issues with the voices in their walls.
They're never going to find the body anyway. Stop worrying.
21ReplyWhat if you are the wall
6ReplyOh, that's a relief, thank you. You can go back making barely audible whispers and occasionally humming Baby Shark now.
5Reply
Jfc, how did they film me?
25ReplyYou're in the Matrix
3Reply
Me last Thursday:
user@work5:~$ [CTRL-R] ls
user@work5:~$ ls
me: "That will do..."
24Replyid type out
more ~/.bash_history | grep ls
and copy, paste before id type outls
tbh 19ReplyWhy do all that typing? Hit ctrl-r first then type ls. Bonus points if you hook fzf into it.
fzf hooked into ctrl-r, a bash history of about 100k and HISTCONTROL=ignoreboth is magic.
Note: backup your history file periodically, system crashes at the wrong time can zero it leaving you incompetent until it's restored.
7ReplyPretty sure you just got wooshed...
1Reply
Useless use of
more
1ReplyYou can pipe it to wl-copy, and then when you need it all you need to type is wl-paste
1Replyat least you avoided a "useless cat" by using "more" instead. Respect Bro!
-1Reply
Last week I switched to a new distro and decided to nuke everything except my personal data in my backup. I immediately regretted not saving my shell history file.
17ReplyGo with McFly and save the history database, you won't regret.
2ReplyFzf does a great job as a Ctrl-r browser too
3Reply
alias l=ls
so you can finally breathe 15ReplyPermanently Deleted
19ReplyThat's just showing off, take an upvote
2Reply
Then you try this on Windows and are disappointed that it doesn't remember anything from your last session.
12Reply 3ReplyMy Powershell history broke yesterday after a very intense git session ;-;
3Reply
Looks more like trying to get into the bios
12ReplyOne finger is not enough for that, could be ESC, F2, F12, DEL or whatever else the bios manufacturer landed on when they threw a dart at the keyboard.
20ReplyRoll your face across the keyboard repeatedly
9ReplyIf you're on an EFI based system and have systemd, you can use
systemctl reboot --firmware-setup
to get into BIOS! 4ReplyDEL has always worked in my experience, even when they don't specify it.
1Reply
Ctrl-r
That said... I didn't discover it so early as I should....
10ReplyL and s are on the other side of the keyboard and I only have one hand free. Too much work.
10ReplyFinally somebody that gets the joke lol all these people in here "well akchually" not getting it
1ReplyThis guy keeps his porn in /var?
3Reply
Ouff... way too accurate.
3Replyzsh if you can survive configuring it
2Replyoh god it me.
I’m only now trying to Ctrl-R my way out of this mess.
1ReplyYup
1Reply