Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-15-2009, 02:59 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2009
Posts: 3
Rep:
|
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?
|
|
|
|
01-15-2009, 03:01 AM
|
#2
|
|
Senior Member
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,411
Rep:
|
|
|
|
|
01-15-2009, 03:24 AM
|
#3
|
|
Senior Member
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 2,784
|
find /path/to/where/your/files/are -name "*orange*" -o -name "*apple*" -o -name "*banana*"
Last edited by Didier Spaier; 01-15-2009 at 03:25 AM.
Reason: Typo
|
|
|
|
01-15-2009, 03:26 AM
|
#4
|
|
LQ Newbie
Registered: Jan 2009
Posts: 3
Original Poster
Rep:
|
this is for single string ABS, i need to find multiple strings through a single find command
|
|
|
|
01-15-2009, 03:27 AM
|
#5
|
|
Senior Member
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 2,784
|
Whom did you answer to ? My proposal is for several strings.
|
|
|
|
01-15-2009, 03:28 AM
|
#6
|
|
Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep: 
|
Something like
find ./ -type f -name '*apple*' -o -name '*banana*'
|
|
|
|
01-15-2009, 04:13 AM
|
#7
|
|
LQ Newbie
Registered: Jan 2009
Posts: 3
Original Poster
Rep:
|
Quote:
Originally Posted by Didier Spaier
Whom did you answer to ? My proposal is for several strings.
|
sorry. i answered your_shadow03. Thank you for your help!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:35 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|