Answers:
我最好用的是带有选项-ri的grep命令(递归且不区分大小写的搜索):
$ grep -r <text_pattern_to_search> directory_or_path_to_search
对您可能有用的选项:
-i - case insensitive
-r, --recursive like --directories=recurse
-R, --dereference-recursive likewise, but follow all symlinks
--include=FILE_PATTERN search only files that match FILE_PATTERN
--exclude=FILE_PATTERN skip files and directories matching FILE_PATTERN
--exclude-from=FILE skip files matching any file pattern from FILE
--exclude-dir=PATTERN directories that match PATTERN will be skipped.
深信息,你可以做
grep --help
或man grep
在Linux终端。
干杯
grep
或更高级的东西吗?