Re: Locate with exclude?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El Domingo, 18 de Febrero de 2007 11:01, Anne Wilson escribió:
> 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
I had the same problem some years ago when I had a linux router on my bedroom 
and locate made so many noise when running in the midle of the night. 
So I decided to change the hour, by default is at 4:00 AM (that's not the 
point, I know, but this is my email and my history :-) )
And the second decision I took was to optimize the directory i wanted updatedb 
to scan.

If you take a look at /etc/updatedb.conf you will see:
PRUNEFS = "auto afs iso9660 sfs udf"
PRUNEPATHS = 
"/afs /media /net /sfs /tmp /udev /var/spool/cups /var/spool/squid /var/tmp"

Just add the paths you want updatedb to do not index and then export 
PRUNEPATHS, run updatedb by hand and then try again with locate
Hope this helps
-- 
Manuel Arostegui Ramirez.

Electronic Mail is not secure, may not be read every day, and should not
be used for urgent or sensitive issues.

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux