<div dir="ltr">locate itself can have regexes and has quite a great load of switches to sort on.<div><br></div><div>However, for a quick and dirty solution, | grep -v $EXCLUDESTRING</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 23, 2014 at 2:20 PM, <span dir="ltr"><<a href="mailto:joe@actionline.com" target="_blank">joe@actionline.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I use the following command to locate all files that contain a specified string (i.e. $FILE) within a specified directory:<br>
<br>
locate $FILE | fgrep -ya "/home/joe/mydata"<br>
<br>
How can I modify that command to do the same thing, except exclude all paths that contain another specified string?<br>
<br>
<br>
------------------------------<u></u>---------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.<u></u>org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/<u></u>mailman/listinfo/plug-discuss</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">James McPhee<br><a href="mailto:jmcphe@gmail.com">jmcphe@gmail.com</a></div>
</div>