• nixx@lemmy.ca
    link
    fedilink
    English
    arrow-up
    13
    ·
    22 hours ago

    history | grep <something I vaguely remember >

    !<number of that command>

    You can do reverse search but I’m too lazy to remember the sequence right now

    • juipeltje@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      18 hours ago

      Oh thanks for this. I’ve been using history | grep $something for the longest time, but i always end up copy pasting the actual command cause i didn’t remember how to invoke the number, and copy pasting is so quick that you end up never looking up how to do it properly lol.