[英]Linux command to find all the files with same name but different extension in a directory?
[英]Linux command line: Find all files with a certain extension in a directory tree containing specific text
我想递归遍历目录树并提取远程 Linux 机器中包含特定文本的所有文件。 我在这个网站上找到了一个有用的命令:
grep -iRl "your-text-to-find" ./
但是,现在我想通过仅在 python (.py) 文件中搜索来稍微修改一下。 我尝试了以下方法,但似乎不起作用:
grep -iRl "your-text-to-find" ./*.py
如何修改命令,使其递归查找包含"your-text-to-find
all.py 文件?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.