ubuntu: locate 命令是 return 错误的结果

ubuntu: locate command is return wrong resutls

这是完整的场景:

dev@ubuntu:~$ locate php.ini
/etc/php/5.6/apache2/php.ini
/etc/php/5.6/cli/php.ini
/etc/php/7.2/apache2/php.ini
/etc/php/7.2/cli/php.ini
/home/dev/htdocs/mweb-centralhubapi/vendor/doctrine/cache/tests/travis/php.ini
/home/dev/htdocs/mweb-centralhubapi_old/vendor/doctrine/cache/tests/travis/php.ini
/home/dev/htdocs/mweb-environment-status/vendor/doctrine/cache/tests/travis/php.ini
/home/dev/htdocs/mweb-jobsapi/vendor/doctrine/cache/tests/travis/php.ini
/mnt/hgfs/mweb/mweb-data/vendor/doctrine/cache/tests/travis/php.ini
/mnt/hgfs/mweb/testCaces/vendor/doctrine/cache/tests/travis/php.ini
/usr/lib/php/7.0/php.ini-development
/usr/lib/php/7.0/php.ini-production
/usr/lib/php/7.0/php.ini-production.cli
/usr/lib/php/7.2/php.ini-development
/usr/lib/php/7.2/php.ini-production
/usr/lib/php/7.2/php.ini-production.cli
dev@ubuntu:~$ sudo rm /etc/php/5.6/apache2/php.ini
rm: cannot remove '/etc/php/5.6/apache2/php.ini': No such file or directory

当我尝试删除文件时它说:没有这样的文件

通过命令切换到root用户:

su - root
updatedb

希望有用。