<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">So to find what I needed I had to do this:<div class=""><br class=""></div><div class=""><blockquote type="cite" class="">find /var/mail/vhosts/ -name '*SPAM*' -type d<br class=""></blockquote><div class=""><br class=""></div>That got me the results I was expecting.</div><div class=""><br class=""><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 21, 2015, at 1:14 PM, Ryan Coleman <<a href="mailto:ryan.coleman@cwis.biz" class="">ryan.coleman@cwis.biz</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Aha! Yeah, that’s what I was trying to think of.<div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 21, 2015, at 1:09 PM, Saul Alanis <<a href="mailto:sdalano@gmail.com" class="">sdalano@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">The one command to search for by directory names that can be piped. </p><p dir="ltr" class="">find /path -name 'SPAM' -type d | xargs <commands></p>
<div class="gmail_quote">On Mar 21, 2015 12:33 PM, "Ryan Coleman" <<a href="mailto:ryan.coleman@cwis.biz" class="">ryan.coleman@cwis.biz</a>> wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I’m having a complete brain fart today… I cannot come up with how to pull this off for some reason - and my google-fu is weak right now, to boot.<br class="">
<br class="">
I need to turn a directory search (folder only, no files) and then take ones that have “.SPAM.” in the path and pipe that into a command…<br class="">
<br class="">
So this:<br class="">
>       /var/mail/vhosts/domain.ltd/<a href="http://user.name/.SPAM.New" target="_blank" class="">user.name/.SPAM.New</a><br class="">
<br class="">
<br class="">
Needs to become this:<br class="">
>       /usr/bin/sa-learn --progress --spam /var/mail/vhosts/domain.ltd/<a href="http://user.name/.SPAM.New/*" target="_blank" class="">user.name/.SPAM.New/*</a><br class="">
>       /bin/mv /var/mail/vhosts/domain.ltd/<a href="http://user.name/.SPAM.New/cur/*" target="_blank" class="">user.name/.SPAM.New/cur/*</a> /var/mail/vhosts/domain.ltd/<a href="http://user.name/.SPAM.Scanned/cur/*" target="_blank" class="">user.name/.SPAM.Scanned/cur/*</a><br class="">
<br class="">
And I’d like to have it in a bash or sh script that I can put into CRON.<br class="">
Additional want: Change emails to read status. I realize that’s another step for the files involved and it could easily be skipped.<br class="">
<br class="">
Thanks!<br class="">
<br class="">
—<br class="">
Ryan<br class="">
_______________________________________________<br class="">
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br class="">
<a href="mailto:tclug-list@mn-linux.org" class="">tclug-list@mn-linux.org</a><br class="">
<a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" target="_blank" class="">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a><br class="">
</blockquote></div>
_______________________________________________<br class="">TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br class=""><a href="mailto:tclug-list@mn-linux.org" class="">tclug-list@mn-linux.org</a><br class=""><a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" class="">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>