<div dir="ltr"><div>You can -o (or) and -a (and) requirements as necessary. You can also logically group them with brackets if your logic is complex.<br><br>find /home/rbclemen/src -iname '*blah*' -a -iname '*crud*' -a -iname '*junk*'<br>
<br></div>You definitely want to use quotes around your params. The * in your find commands will be expanded if you have matching file patterns in your current directory, which will cause your command to not work. Quoting is also important in your mv command, in case file names or paths contain spaces. Also, you likely can just -exec your command, without having to use xargs:<br>
<div><br>find /home/rbclemen/src -iname '*blah*' -a -iname '*crud*' -a -iname '*junk*' -exec mv -v '{}' . \;<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 4:13 PM, R. Brent Clements <span dir="ltr"><<a href="mailto:rbclemen@gmail.com" target="_blank">rbclemen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I am searching through pretty well randomized directories for files using strings that I have massaged into the form *blah*crud*junk* using a spreadsheet.  So the command:<br>
<br></div>find /home/rbclemen/src -iname *blah*crud*junk* -print0 | xargs -t -0 -I {} mv -v {} .<br>
<br></div>does what I want it to.  It would be more useful, however, if the order of the words in the search string was not relevant.  it currently only finds instances where those words appear in that order, or as part of words that appear in that order.  Anyone able to suggest a way to make the matching of the multiple terms not order dependent?  Producing additional strings with the terms in a different order would be non trivial.<span class="HOEnZb"><font color="#888888"><br>

<br>Brent<br></font></span></div>
<br>_______________________________________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org">kwlug-disc@kwlug.org</a><br>
<a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" target="_blank">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Chris Irwin<br><<a href="mailto:chris@chrisirwin.ca" target="_blank">chris@chrisirwin.ca</a>></div>
</div>