Well, don't, that's what this post is for :)
Let's go for the command:
$ find
Where:
[1] a folder name: for instance, to look from the current folder, use ".".
[2] for instance, for files ending in .py, use this: "*.py"
[3] a string to look for. Case insensitively.
Example: Let's look for the string "hello", case insensitively, between the files of the current folder and its subfolders, inside files with filename ending in .py:
$ find . -iname '*.py' | xargs grep -in 'hello'
The output will say the file(s) and line numbers in those files where 'hello' was found.
1 comentario:
Está bueno esto. Es una buena alternativa a "git grep" cuando no estás usando un sistema de control de versiones GIT :)
Publicar un comentario