Linux grep: Search recursively within a file

Other language site
ja ja
Google Translate
  • -

    シェア
  • ---

    LINEで送る
  • -

    はてなブックマーク
    ブックマーク
  • -

    pocket
  • -

    rss
programing image

When searching for arbitrary keywords in the file, use the option "r" with the grep command to search including subdirectories.

grep -r search-string [dir | file]

Important here, directory and file patterns can not be used.

*.php

readme.*

This means that we can not use it.

Specify the full name of the directory name, file name, or specify an asterisk (*).

When specifying an asterisk, search all under the current directory.

SNS also distributes articles.
Leave a Reply

*

If you like this article, share it!