我经常使用以下命令
find . ! -iname "*test*" -o -iname "*foo*" | xargs zgrep -ie first.*last -e last.*first我之所以使用zgrep,是因为它可以通过.gz文件进行grep,如果没有压缩文件,则只需使用grep。但是我经常得到
gzip: copy.txt.gz: No such file or directory日志干扰了我搜索的输出。有什么方法可以静音这些gzip日志吗?
发布于 2016-09-29 13:13:04
可以将命令标准错误输出重定向到空设备。
find . ! -iname "*test*" -o -iname "*foo*" | xargs zgrep -ie first.*last -e last.*first 2>/dev/null https://unix.stackexchange.com/questions/320398
复制相似问题