Linux 计算使用“生成”生成的文件数;查找“;命令
例如,我的命令是Linux 计算使用“生成”生成的文件数;查找“;命令,linux,Linux,例如,我的命令是 find . -type f -name "script.log" -exec grep "finished without error" {} \; 它生成数百行输出。如何计算找到的文件数?您可以将find的输出传递到“字数”程序wc find . -type f -name "script.log" -exec grep "finished without error" {} \;| wc -l wc-l将行数写入标准输出 您可以将find的输出传递给“字数”程序wc
find . -type f -name "script.log" -exec grep "finished without error" {} \;
它生成数百行输出。如何计算找到的文件数?您可以将find的输出传递到“字数”程序
wc
find . -type f -name "script.log" -exec grep "finished without error" {} \;| wc -l
wc-l
将行数写入标准输出 您可以将find的输出传递给“字数”程序wc
find . -type f -name "script.log" -exec grep "finished without error" {} \;| wc -l
wc-l
将行数写入标准输出 这回答了你的问题吗?这回答了你的问题吗?