Search code examples
nixnixos

How to install the locate command on nixos


I've searched on the nixos package manager, if there is package named locate. Yes and several. But that's not the bash command that I am searching for.

I want to add this bash command

locate name.extention

which gave me the path of this file


Solution

  • The package mlocate provides a locate executable. The package plocate provides an executable named plocate which might be better. Both of these packages will require some extra setup steps to allow them to build their file location database, and I don't happen to have a link to those instructions at the moment.

    nix-shell -p mlocate