NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
mfe_
Feb 25, 2013Tutor
updatedb.conf & locate searching only on system partion
Hello,
i tried to tell locate to search only on the system partion.
So I modified File: /etc/updatedb.conf to this
I executed updatedb but it still prints files from the data partion. What can i try else?
i tried to tell locate to search only on the system partion.
So I modified File: /etc/updatedb.conf to this
# This file sets environment variables which are used by updatedb
# filesystems which are pruned from updatedb database
PRUNEFS="NFS nfs afs proc smbfs autofs auto iso9660 ncpfs coda devpts ftpfs"
export PRUNEFS
# paths which are pruned from updatedb database
PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /amd /alex /var/spool /media /www /backup /c /USB /c/home /c/media /c/backup /c/www"
export PRUNEPATHS
# netpaths which are added
NETPATHS=""
export NETPATHS
I executed updatedb but it still prints files from the data partion. What can i try else?
1 Reply
Replies have been turned off for this discussion
- ErikLtzAspirantOhh, answering a really old question: I also updated the /etc/updatedb.conf file only to find it's not used. Looking inside /usr/bin/updatedb (thats actually a shell script) there is no reference to updatedb.conf. Either it's meant to be started by someone else, or a "source /etc/updatedb.conf" is missing. Manually I ran it like this:
> source /etc/updatedb.conf
> updatedb
and can now use locate (omitting a number of huge backup directories in my updatedb.conf that would never finish find/sort otherwise). Happy :-)
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!