Wednesday, February 15, 2023

Searching using grep and ack

grep -r "example" . --exclude-dir=node_modules --exclude-dir=vendor

Searches current directory

ack 'forgot_password_email' --ignore-dir=node_modules --ignore-dir=log

ack gives line numbers of the string in the file