Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

find

bash

unix

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 ?

like image 642
Manuel Selva Avatar asked Oct 28 '10 06:10

Manuel Selva


1 Answers

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" 
like image 124
Benoit Avatar answered Oct 04 '22 19:10

Benoit