A simple cli tool for indexing/searching files in your filesystem
glocate is an alternative to the locate/updatedb commands written in Go.
go install github.com/fedeztk/glocate@latestCreate the index database
glocate --indexSearch for a pattern (regex are supported out of the box)
glocate "pattern" # case sensitiveglocate --smartcase "pattern" # case insensitive if the pattern is all lowercaseglocate --color "pattern" # colorize the outputFor a full list of options and shortcuts see the help page
glocate --helpThe configuration can be done via environment variables, flags, and a config file.
The config file is in yaml format. It will be created automatically if it does not exist under $HOME/.config/glocate/glocate.yaml. Default values are shown below.
directories: # directories to index
- "$HOME"
ignoredPatterns: # patterns to ignore
- "$HOME/.cache"
ignoreSymlinks: true # do not follow symlinks
ignoreHidden: false # ignore hidden filesA special thanks to the creator of the walk implementation used to walk the filesystem (see here).
Acknowledgements also go to the creators of all the other libraries used in this project, see go.mod for a full list.