我有一台在centos 7上运行的服务器。我需要找到一个包含0774386850的文件,以便可以用另一个字符串替换。请给我一个Linux命令给我那个文件
通过使用grep命令,可以实现您的预期
grep -rlnw '/path/to/somewhere/' -e '0774386850'
-r or -R is recursive,
-n is line number, and
-w stands for match the whole word.
-l (lower-case L) file name of matching files.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5677 次 |
| 最近记录: |