this post was submitted on 01 Jul 2023
617 points (97.8% liked)

linuxmemes

20880 readers
4 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] 3 points 1 year ago (3 children)

cat .bash_history | grep keyword

But yeah pretty much.

[–] [email protected] 4 points 1 year ago

Why not just history | grep keyword then? Works in any directory.

[–] [email protected] 2 points 1 year ago

You know you don't actually have to do cat 😂. But yeah, I know, I do it as well 🤣.

[–] [email protected] 1 points 1 year ago

Yeah, I grep on history and then ! to execute the line I want