Improve the locate statistics
- show last update date, and how many days ago
- better readable compression factor instead percentage
- improve wordings (8-Bit -> nonprintable ASCII)
- refactor statistics into a new file
e.g.:
old:
$ locate -S
Database: /var/db/locate.database
Compression: Front: 9.96%, Bigram: 65.01%, Total: 7.38%
Filenames: 29910923, Characters: 2902743213, Database size: 214123631
Bigram characters: 74925080, Integers: 716236, 8-Bit characters: 4
Longest path: 223
new:
$ locate -S
Database: /var/db/locate.database
Last database update: Sat Feb 5 07:48:15 2022 (4.4 days ago)
Database size: 213401959 bytes
Filenames: 29820255
Longest pathname: 223 bytes
Compression factor: front: 10.0x, bigrams: 1.4x, total: 13.6x
Filenames size: 2894961156 bytes
Data types: int: 712776, bigrams: 74761507, nonprintable ASCII: 4