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

Re: slocate




DMW wrote:
> 
> Hi --
> 
> Got an annoyance I'd like some help with.  Every evening when I log into
> my workstation, my hard disk spins back up as the system wakes back up.
> Almost immediately the system slows to a crawl as something called
> slocate starts running.  Apparently it doesn't run when the CPU is
> suspended, as is the case when power management kicks on.
> 
> I found a cron job called slocate.cron which has this in it:
> 
> #!/bin/sh
> 
> NETMOUNTS=`mount -t nfs,smbfs,ncpfs | cut -d ' ' -f 3`
> NETPATHS=`echo $NETMOUNTS | sed -e 's| |,|g'`
> 
> if [ -n "$NETPATHS" ]; then
>   /usr/bin/slocate -u -e
> "$NETPATHS,/tmp,/var/tmp,/usr/tmp,/afs,/net,/proc"
> else
>   /usr/bin/slocate -u -e "/tmp,/var/tmp,/usr/tmp,/afs,/net,/proc"
> fi
> ~
> 
> Can anyone tell me what exactly this does?  How can I turn off this job,
> since I don't know how it got started to begin with?  Do I need this to
> run every day like this?
> 
> TIA,
> derek

It is a program for locating files quickly and easily.  That
slocate.cron was probably in something like /etc/cron.daily, in which it
gets run sometime during the night and builds the database of all the
files on your system.  Then when you need to find something, just run
"locate passwd" and in mere seconds you have your answer.

But it shouldn't be running every time you log on, unless you mean when
you boot into Linux.  There may be some code in the startup scripts to
run once on bootup, but then you'd have to hunt down in /etc/rc.d for
the file that calls it...

--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.