开发者

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

开发者 https://www.devze.com 2023-01-22 13:05 出处:网络
This question already has answers here: Using find to locate files that match one of multiple patterns
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

精彩评论

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