Answers:
man updatedb
搜索“文件”
我的说:
FILES
/etc/updatedb.conf
A configuration file. See updatedb.conf(5).
/var/lib/mlocate/mlocate.db
The database updated by default.
无需反编译可执行文件!只是请问“定位” :-)
对于更新的b / 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)
在debian上,默认情况下,定位数据库存储在
/var/cache/locate/locatedb
如果mlocate
用作搜索索引器:
mlocate数据库存储在
/var/lib/mlocate/mlocate.db
[2017年修订]:参见上述答案:找到--statistics作品。
如果您有/etc/updatedb.conf,则可以在其中查找。我不。您可以阅读手册页中的locate,其中指出默认位置为/ var / cache / locate / locatedb。我的不在。您可以使用自身定位来搜索名为“ updatedb”或“ locatedb”的文件。我在Windows 7上使用Cygwin。
mlocate.db
?
$ sudo strace updatedb 2>&1 | grep -o "^open.*O_RDWR.*"