[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: does find has feature to find several names



In <[🔎] 60f50c4a0907180345s21ecd941w29b8be4319e5385b@mail.gmail.com>, Soren Orel 
wrote:
>thank you, but i don't need regex, I'm just searching, that is there a
>shorter way in the find command to search for e.g.: two filenames
>
>find . -type f -name "*.sh" -o -name "*.html"
>
>so that I don't have to write "-o -name" at every time :D:P

Using regex:

find . -type f -regex '.*\.(sh|html)'
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: