203
Linux Users (lemmy.ml)
top 27 comments
sorted by: hot top controversial new old
[-] PanArab@lemmy.ml 20 points 1 week ago
[-] Fossifoo@hexbear.net 2 points 1 week ago

Or if you are not sure what it was at all: history

[-] ramius345@sh.itjust.works 18 points 1 week ago
[-] calliope@retrolemmy.com 2 points 1 week ago* (last edited 1 week ago)

Or sometimes history if I can’t remember at all.

Oh my bad, two other people said that too I was just excited

[-] foster@lemmy.hangdaan.com 10 points 1 week ago

It's either this or history | grep 'some-command'.

[-] nathan@piefed.alphapuggle.dev 9 points 1 week ago* (last edited 1 week ago)

history

!982

[-] roux@hexbear.net 9 points 1 week ago

Me with git pushes: up up up, enter x3. Like 6 times a day.

[-] yogthos@lemmy.ml 8 points 1 week ago
[-] roux@hexbear.net 11 points 1 week ago

Not me using Linux for 15 years and just learning you can search through previous commands...

[-] isame@hexbear.net 2 points 1 week ago

I hope I'm not blowing your mind when I tell you that you can grep .bash_history?

[-] roux@hexbear.net 2 points 1 week ago

Easy there wizard. In my defense I don't hang out in a terminal all that much anymore.

[-] Jolteon@lemmy.zip 1 points 1 week ago

With only three up presses, it would probably be faster than ctrl+r

[-] naevaTheRat@lemmy.dbzer0.com 1 points 1 week ago

Just make some aliases and scripts you lunatic.

[-] HumanPerson@sh.itjust.works 9 points 1 week ago

You forgot a couple down arrows for when you overshoot.

[-] lugal@lemmy.dbzer0.com 7 points 1 week ago
[-] highduc@lemmy.ml 6 points 1 week ago

If you're in this picture try using fzf and backwards search, much more effective, hell even without fzf.

[-] KrasMazov@lemmygrad.ml 5 points 1 week ago

Don't call me out like that lol. Also Atuin is pretty cool for this as you are showed a list of the commands used when you press ⬆️.

[-] Moonrise2473@lemmy.ml 5 points 1 week ago

Introducing: fish

And then you just need to remember the first letters of the previously typed command

[-] yogthos@lemmy.ml 3 points 1 week ago

Yup, I started using fish a while back and autocomplete is what kept me on it. The best part is that it's contextual based on the folder you're in.

[-] barubary@infosec.exchange 3 points 1 week ago

Look up history-search-backward in your favorite bash/readline manual.

[-] HiddenLayer555@lemmy.ml 5 points 1 week ago* (last edited 1 week ago)

The command you want is in the buffered history of a still running terminal that's doing something you don't want to close πŸ’€

[-] Rom@hexbear.net 5 points 1 week ago

Why would I type out this command that's six whole keystrokes long when I can save time by pressing 'up' twenty times instead?

[-] scottmeme@sh.itjust.works 4 points 1 week ago
[-] naevaTheRat@lemmy.dbzer0.com 4 points 1 week ago

Some of you haven't read the bash manual and it shows.

Blow your mind to know about bang patterns. You've used !! but do you know about !$?

[-] krash@lemmy.ml 3 points 1 week ago

If you haven't, try McFly - is a much better backwards / history search in the shell.

[-] Diurnambu1e@hexbear.net 2 points 1 week ago

After a time ypu look into extending the history too... 500line by default is far too short for all the awesome commands

this post was submitted on 24 Sep 2025
203 points (98.6% liked)

Programmer Humor

38555 readers
140 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS