this post was submitted on 04 Jul 2023
1207 points (98.6% liked)

linuxmemes

20880 readers
3 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 6 points 1 year ago (1 children)

This is my approach, and for those who don't know, you can use those line numbers that come back from history to rerun the command. Like if your output is something like this:

$ history | grep tmp
  501  ls /tmp
  502  history | grep tmp

You can run !501 and it will just re-run ls /tmp

[โ€“] [email protected] 1 points 1 year ago

Woah! I had no clue!