在当前目录下查找查找包含“hello”的命令,列出文件名。
find . -type f -name "*.txt" | xargs grep "hello" -l
如果你想在当前目录下 查找"hello,world!"字符串,可以这样: grep -rn "hello,world!" ./ ./ : 表示路径为当前目录. -r 是递归查找 -n 是显示行号
在当前目录下查找查找包含“hello”的命令,列出文件名。
find . -type f -name "*.txt" | xargs grep "hello" -l
如果你想在当前目录下 查找"hello,world!"字符串,可以这样: grep -rn "hello,world!" ./ ./ : 表示路径为当前目录. -r 是递归查找 -n 是显示行号