一旦工作,那就要努力的干,聪明的干,快速的干——用省下来的时间干自己喜欢干的事情。!

linux centos6 7下递归查找文件内容 遍历所有文件

linux lampnick 3894℃ 0评论

linux centos6 7下递归查找文件内容 遍历所有文件

在当前目录下递归查找所有的文件中的"lampnick"字符串
grep "lampnick" -ri -n ./
-r, --recursive
 Read all files under each directory, recursively, following symbolic links only if they are on the command line. This is equivalent to the -d recurse option.
-i, --ignore-case
 Ignore case distinctions in both the PATTERN and the input files. (-i is specified by POSIX.)
-n, --line-number
 Prefix each line of output with the 1-based line number within its input file. (-n is specified by POSIX.)

 

转载请注明:MitNick » linux centos6 7下递归查找文件内容 遍历所有文件

喜欢 (9)or分享 (0)
头像
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址