In order to search for a string in some files, use 'grep' like this:

         grep "string" filename1 [filename2 filename3 ...]

This will print out the lines in the files that contain the string.  grep can also do a lot more advanced searches - type 'man grep' for details.

         #grep "string" filename1 [filename2 filename3 ...]

这个命令可以输ch包含该字符串的文件对应的行的内容,grep命令还有许多高级搜索功能,输入man grep查询细节。


您的电子邮箱地址不会被公开。 必填项已用 * 标注