One - One Code All

Blog Content

Mac 查找目录下包含某字符串的所有文件grep

Linux-Mac   2020-06-12 09:45:43

mac字符串查找。

grep -n "findstr" -r ./

find .|xargs grep -ri "findstr"

该命令会查找当前目录及其子目录下所有包含指定字符串的文件,会列出文件位置、该行的内容以及行号。



上一篇:RHSA-2020:1135-低危: polkit 安全和BUG修复更新
下一篇:Mac OS X使用mdbtools访问导入mdb数据库到mysql

The minute you think of giving up, think of the reason why you held on so long.