plocate
plocate is a much faster locate utility based on posting lists, providing quick file name searches on a smaller index. It serves as a drop-in replacement for mlocate and performs efficiently on both SSDs and non-SSDs.
Description
plocate enables rapid searching for files by name using a highly optimized index generated from posting lists. It is designed as a drop-in replacement for mlocate, maintaining compatibility in nearly all aspects while delivering significantly faster search performance. The tool is particularly effective for large filesystems, making it ideal for forensics, system administration, and quick file location tasks in Kali Linux environments.
Key components include plocate for searching, plocate-build for generating the index from mlocate databases or plaintext files, and updatedb.plocate for maintaining the database. These utilities support customization through various flags, allowing users to tailor searches and index builds to specific needs, such as case-insensitive matching or limiting output.
Use cases include quickly locating files during incident response, auditing systems, or navigating complex directory structures. The default database is /var/lib/plocate/plocate.db, with configuration options drawn from /etc/updatedb.conf.
How It Works
plocate uses posting lists to create a compact index that enables much faster searches compared to traditional locate implementations like mlocate. The index is generated by plocate-build from an mlocate.db or plaintext input, storing filenames in blocks (default 32 per block) for efficient querying. updatedb.plocate refreshes the database by scanning specified subtrees, applying prune rules from configuration, and outputting to the plocate.db format. Searches match patterns against basename or full paths, with options for case-insensitivity, limits, and output formatting.
Installation
sudo apt install plocateFlags
Examples
plocate -hplocate-build -hplocate-build MLOCATE_DB PLOCATE_DBupdatedb.plocate -hupdatedb.plocateplocate PATTERNplocate -i PATTERN