I'd like to find files whose name contain "Mar" or "Jun", how can I do this?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
|
Your first approach (
So the only possible matches were files that were named exactly "Jun" and "Mar", i.e. none. Instead, do the following:
Example:
|
|||||||||
|
|
Use
|
|||
|
|
This command will work [max@localhost ~]$ find / -type f -name Mar -o -name Jun ./Mar ./Jun UPDATE Then this is the answer find / -type f -name "*Mar*" -o -type f -name "*Jun*" |
|||||
|