Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试查找所有名为“abc”、“qwe”、“asd”或“zcx”的文件。
find . -name "abc"|"qwe"|"asd"|"zcx"
这不正确吗?
用这个:
find . -name "abc" -o -name "qwe" -o -name "asd" -o -name "zcx"
尝试这个:
find . -regex '.*/\(abc\|qwe\|asd\|zcx\)$'
注意:-regex将匹配整个路径。
-regex