this post was submitted on 14 Dec 2024
405 points (97.2% liked)

Comic Strips

12929 readers
3447 users here now

Comic Strips is a community for those who love comic stories.

The rules are simple:

Web of links

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] tequinhu 13 points 3 days ago* (last edited 3 days ago) (3 children)

grep -irl "some text that the file would have"

(Obiously only work for text files, but that's enough to cover 90% of cases for me)

[–] [email protected] 13 points 3 days ago

Now we need a /c/grep_irl

[–] [email protected] 4 points 3 days ago (1 children)

That's a solid windows shame.

[–] tequinhu 1 points 3 days ago

Fun fact: I use "git bash shell" over windows' cmd just because of grep

[–] indepndnt 1 points 3 days ago (2 children)

I don't know what those flags mean, but from context I think this is a command I've needed a bunch of times but haven't had the time or energy to learn about yet. So thanks! I can't wait to try it!

[–] tequinhu 2 points 3 days ago
  • case insensitive
  • rrecursive
  • only show filenames

I also like to use:

  • I (capital i) to skip binary files, if I'm in a folder with heavy images/videos/etc
  • c 3 to show 3 lines around the matched text