# Locate database problem on PowerPC



## dalizard (Apr 2, 2010)

Hello. I am running FreeBSD 8.0 on a PowerPC. After running


```
/etc/periodic/weekly/310.locate
```

the _locate_ command still doesn't work:


```
[root@aphex:~]$ locate emacs
[root@aphex:~]$
```

Another interesting point is that if I run


```
[root@aphex:~]$ locate root
```

I get bunch of paths that are either nonexistent or simply bizarre looking:


```
. . . . . 
/usr/src/Nec
/usr/src/Nec
/usr/src/Nec
/usr/src/Nec
/usr/src/Nec
/usr/src/
 . . . . . 
/usr/src/
/usr/src/
/usr/src/
/usr/src/'tols/
/usr/src/'tols/
/usr/src/'tols/
. . . . .
```

Anyone having any suggestions what might be causing this interesting problem ? I've already deleted the locate database, re-run _310.locate_ both as root and different users and still the same problem occurs.


----------



## sossego (Apr 22, 2010)

```
%su
password:
# cd /usr/libexec
#$PWD/locate.updatedb
```

You need to run it first.

You can also try 
	
	



```
man locate
```
 and all of the references are in there.


----------



## dalizard (Apr 23, 2010)

@sossego, Thanks for the help, but it still doesn't work. Not sure if this might be helpful:


```
[root@aphex ~]# locate -S wget

Database: /var/db/locate.database
Compression: Front: 18.05%, Bigram: 55.57%, Total: 12.50%
Filenames: 462775, Characters: 29697647, Database size: 3711563
Bigram characters: 1649012, Integers: 17586, 8-Bit characters: 0
```


----------



## sossego (Apr 23, 2010)

You're using the flag for the locate database statistics.

Look at 
	
	



```
man locate
```
 at the use of the flags. Maybe you need the -d and the -i options.


----------

