开发者

Find file ending with .sh OR .bin [duplicate]

This question already has answers here: Using find to locate files that match one of multiple patterns (12 answers) Closed 1 year ago. 开发者_运维技巧

How can I find all the files ending with .sh OR .bin in a given folder.

I know I can do:

find /path/to/folder -name "*.bin"

to find all bin file. What must I add to also look for .sh files ?


The manual page tells you that -o is the OR operator. If you want case insensitivity, use iname instead of name.

find /path/to/folder -iname "*.bin" -o -iname "*.sh"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜