Locate with exclude?

Chris Jones jonesc at hep.phy.cam.ac.uk
Sun Feb 18 11:03:07 UTC 2007


On Sunday 18 February 2007 10:01:15 am Anne Wilson wrote:
> I generally use locate to find a file, but I have /mnt/FC4root
> and /mnt/FC4/home, and dozens of 'finds' are reported that are not
> relevant. I'd like to use locate, telling it to ignore/mnt/FC4*, but
> nothing in the man pages tells me that this is possible.
>
> Does anyone have a solution to searching while excluding large areas like
> this?
>
> Anne

How about

 locate XXX | grep -v '/mnt/FC4'

Chris ?




More information about the fedora-list mailing list