I'm trying to search my directory for files that contain ../
with grep -r -n '../' *
, but I get lots of false positives. grep
is interpreting the period as a wild character, how do I stop this?
Just escape the dots:
grep -r -n '\.\./' *
Tested in Cygwin. Dot is of course a wildcard in regular expressions.
Escape the dots with backslashes: \.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With