1

Locate and BTRFS

 1 year ago
source link: https://www.lorenzobettini.it/2022/07/locate-and-btrfs/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Locate and BTRFS

I’ve always been using the locate command (provided by the mlocate package or by the new plocate package), which quickly searches for files and directories by their names. The command relies on the database built by the command updatedb (which should be run periodically, e.g., by enabling the plocate-updatedb.timer service for plocate).

Unfortunately, by default, it does go well with the BTRFS filesystem and its subvolumes (see, e.g., this bug), resulting in empty results for all searches basically.

Fortunately, the solution is quite simple:

  1. edit the file /etc/updatedb.conf
  2. replace PRUNE_BIND_MOUNTS = “yes” with PRUNE_BIND_MOUNTS = “no”
  3. save, exit and re-run updatedb

Then, you can enjoy locate’s search results 🙂

Like this:

Loading...

This entry was posted in Tips and Tricks and tagged btrfs, linux on July 25, 2022.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK