How to use locate and exclude certain strings?

James Mcphee jmcphe at gmail.com
Tue Dec 23 14:31:34 MST 2014


locate itself can have regexes and has quite a great load of switches to
sort on.

However, for a quick and dirty solution, | grep -v $EXCLUDESTRING

On Tue, Dec 23, 2014 at 2:20 PM, <joe at actionline.com> wrote:
>
> I use the following command to locate all files that contain a specified
> string (i.e. $FILE) within a specified directory:
>
> locate $FILE | fgrep -ya "/home/joe/mydata"
>
> How can I modify that command to do the same thing, except exclude all
> paths that contain another specified string?
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>


-- 
James McPhee
jmcphe at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20141223/a0e54fa6/attachment.html>


More information about the PLUG-discuss mailing list