Hello! Find command
The command find
is a command-line utility that searches one or more directory trees of a file system, locates files based on some user-specified criteria.
The following example will print out the files that find returns that contain the text "lime"
:
$ find . | grep "lime"
Now, by using the exec
switch with the find
command, we can find all the files that contain the search string ("lime"
).
$ find . -exec grep "lime" {} \;
Get hands-on with 1400+ tech skills courses.