home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / doc / findutils / README.Debian < prev    next >
Encoding:
Text File  |  2007-03-05  |  1.8 KB  |  51 lines

  1. Some people wish to have updatedb only include mount points which are
  2. automatically mounted by "mount -a", which mounts devices listed in
  3. /etc/fstab. 
  4.  
  5. The following lines may be added to /etc/updatedb.conf to exclude
  6. non-automatic mount points from updatedb.  Add before the
  7. "export PRUNEPATHS" line in /etc/updatedb.conf. 
  8.  
  9. # mount points not to be scanned (regexp matching lines into /etc/fstab)
  10. EXCLUDE_MOINT_POINTS=noauto
  11. EXCLUDE_PATH=`awk "/^#/ {next}; /$EXCLUDE_MOINT_POINTS/ {print \\$2}" < /etc/fstab | tr '\012' ' '`
  12. PRUNEPATHS="$PRUNEPATHS $EXCLUDE_PATH"
  13.  
  14. This suggestion is due to Eric Delaunay
  15. <delaunay@lix.polytechnique.fr>
  16.  
  17.  
  18. > The problem is NOT
  19. > updatedb, rather it's actually caused by the "checksecurity" call in
  20. > /etc/cron.daily/standard.  The easy fix for this is to mount your NFS
  21. > stuff nosuid and nodev so it ignores them.
  22.  
  23. --------------------------------
  24.  
  25. My systems slows down everyday at bootup, how can I stop the daily
  26. updatedb-invocations?
  27.  
  28. Edit /etc/updatedb.conf or even /etc/cron.daily/find. Both files
  29. are dpkg conffiles and you changes won't be overwritten.
  30.  
  31. Examples:
  32. * Run weekly instead of daily:
  33.   Add this to the head of /etc/updatedb.conf
  34.   #----------
  35.   if [ -d /var/cache/locate ] ; then
  36.      # locatedb is younger than 7 days
  37.      [ -n "`find /var/cache/locate -name locatedb -mtime -7`" ] && exit 0
  38.   fi
  39.   #----------
  40.   To run every other day on would use "2" instead of "7".
  41.  
  42. * Disable updatedb completely:
  43.   Either delete /etc/cron.daily/find or add "exit 0" as the second line of
  44.   /etc/cron.daily/find
  45.  
  46. * On a laptop only update the locate database if running on AC-power:
  47.   Add "on_ac_power || exit 0" as the second line of /etc/cron.daily/find.
  48.   If you are using anacron for running cron.daily there is no need for
  49.   changing /etc/cron.daily/find, anacron will by default not execute the
  50.   jobs when the system is running on battery.
  51.