this post was submitted on 01 Jul 2023
698 points (100.0% liked)

linuxmemes

20875 readers
677 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
[–] snake@lemmy.world 4 points 1 year ago (3 children)

cat .bash_history | grep keyword

But yeah pretty much.

[–] 1337@lemmy.world 4 points 1 year ago

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

[–] 0x4E4F@sh.itjust.works 2 points 1 year ago

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

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