我想删除与清除所有条目的定位及其数据库。
我试过了
apt-get purge locate
和
rm /etc/updatedb*
但是数据库也走了吗?
updatedb数据库位于debian挤在哪里?
我也想手动删除它,所以我可以干净地重新安装它
man updatedb
search“文件”
我说:
FILES /etc/updatedb.conf A configuration file. See updatedb.conf(5). /var/lib/mlocate/mlocate.db The database updated by default.
在debian上,定位数据库默认保存在
/var/cache/locate/locatedb
如果您使用mlocate作为search索引器:
mlocate数据库存储在
/var/lib/mlocate/mlocate.db
请参阅: 如何查看updatedb数据库内容,然后排除某些文件/path?
我更喜欢这个过程,因为它会引导你到那里。 这将是分布不可知论和工程,如果你没有手册页。
# strace updatedb 2>&1 |grep ^open|grep db open("/etc/updatedb.conf", O_RDONLY) = 3 open("/var/lib/mlocate/mlocate.db", O_RDWR) = 3 open("/var/lib/mlocate/mlocate.db.bUUaw4", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
无需反编译的可执行文件! 只是请问“定位”:-)
对于updatedb / locate(GNU findutils)版本4.6.0,请尝试调用
locate --statistics
对我来说(在Cygwin)这产生了类似的东西
Database /var/locatedb is in the GNU LOCATE02 format. Database was last modified at 2017:03:13 22:44:31.849172100 +0100 Locate database size: 6101081 bytes All Filenames: 202075 File names have a cumulative length of 22094021 bytes. Of those file names, 2591 contain whitespace, 0 contain newline characters, and 20 contain characters with the high bit set. Compression ratio 72.39% (higher is better)
[在2017年编辑]:见上面的答案:定位 – 统计工程。
如果你有一个/etc/updatedb.conf,你可以看看那里。 我不。 您可以阅读查找的手册页,其中说默认位置是/ var / cache / locate / locatedb。 我的不在那里。 您可以使用定位本身来search名为“updatedb”或“locatedb”的文件。 我在Windows 7上使用Cygwin。