Chris@feddit.uk to Comic Strips@lemmy.worldEnglish · 15 days agoFiles [Admiral Wonderboat]files.mastodon.socialexternal-linkmessage-square29fedilinkarrow-up1421arrow-down112file-text
arrow-up1409arrow-down1external-linkFiles [Admiral Wonderboat]files.mastodon.socialChris@feddit.uk to Comic Strips@lemmy.worldEnglish · 15 days agomessage-square29fedilinkfile-text
minus-squaretequinhu@lemmy.worldlinkfedilinkarrow-up14arrow-down1·edit-215 days agogrep -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)
minus-squaretequinhu@lemmy.worldlinkfedilinkarrow-up1·15 days agoFun fact: I use “git bash shell” over windows’ cmd just because of grep
minus-squareRikudou_Sage@lemmings.worldlinkfedilinkarrow-up1·6 days agoYou can also use WSL to get a full Linux there. If WSL1 is still available, it would be better for this use case.
minus-squareindepndnt@lemmy.worldlinkfedilinkarrow-up1·15 days agoI 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!
minus-squarenaticus@lemmy.worldlinkfedilinkEnglisharrow-up2·15 days agoThis’ll help: https://explainshell.com/explain?cmd=grep+-irl+"some+text"
minus-squaretequinhu@lemmy.worldlinkfedilinkarrow-up2·15 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
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)
Now we need a /c/grep_irl
That’s a solid windows shame.
Fun fact: I use “git bash shell” over windows’ cmd just because of grep
You can also use WSL to get a full Linux there. If WSL1 is still available, it would be better for this use case.
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!
This’ll help:
https://explainshell.com/explain?cmd=grep+-irl+"some+text"
i
nsensitiver
recursivel
enamesI also like to use:
I
(capital i) to skip binary files, if I’m in a folder with heavy images/videos/etcc 3
to show 3 lines around the matched text