I would like to search recursively in all the files and directories under a directory for some strings e.g. library
.
I also would like to exclude files and directories which store downloaded webpages but are not .html
or .htm
files (which are still of my interest), such as:
- files whose filenames have certain extensions, such as
.js
,.css
,.png
,.gif
,.jpeg
, and - directories whose names are ended with
_files
.
so how shall I do that? I am thinking about using locate
before find
, because locate
is faster, but I don't know locate
can do it or not. Thanks.