gpt4 book ai didi

linux - 列出不包含模式的文件

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:48:02 26 4
gpt4 key购买 nike

<分区>

在 bash 中,如何列出不包含给定字符串的文件?


鉴于此

grep --include=*.c  -rlw './' -e "pattern"

返回与我期望的模式匹配的任何文件

grep --include=*.c  -rlwv './' -e "pattern"

将返回任何不匹配模式的文件,但它只返回所有 *.c 文件,无论它们是否匹配模式。

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com