LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using a single "Find" Command to find files bases on multiple criteria (http://www.linuxquestions.org/questions/linux-newbie-8/using-a-single-find-command-to-find-files-bases-on-multiple-criteria-697433/)

roboxooo 01-15-2009 02:59 AM

Using a single "Find" Command to find files bases on multiple criteria
 
I want to find files having any of the following word in its name
orange, apple, banana ?
How can I do it with a single command?

your_shadow03 01-15-2009 03:01 AM

http://www.linuxquestions.org/linux/...uick_find_Tips

Didier Spaier 01-15-2009 03:24 AM

find /path/to/where/your/files/are -name "*orange*" -o -name "*apple*" -o -name "*banana*"

roboxooo 01-15-2009 03:26 AM

this is for single string ABS, i need to find multiple strings through a single find command

Didier Spaier 01-15-2009 03:27 AM

Whom did you answer to ? My proposal is for several strings.

billymayday 01-15-2009 03:28 AM

Something like

find ./ -type f -name '*apple*' -o -name '*banana*'

roboxooo 01-15-2009 04:13 AM

Quote:

Originally Posted by Didier Spaier (Post 3409390)
Whom did you answer to ? My proposal is for several strings.

sorry. i answered your_shadow03. Thank you for your help!


All times are GMT -5. The time now is 01:30 PM.