Skip to content
generated from github/codespaces-blank

glocate is a Go alternative to locate and updatedb in one command. It creates a small DB thanks to lz4 compression

License

Notifications You must be signed in to change notification settings

fedeztk/glocate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glocate

go report CI/CD

A simple cli tool for indexing/searching files in your filesystem gopher

glocate is an alternative to the locate/updatedb commands written in Go.

Installation

go install github.com/fedeztk/glocate@latest

Usage

Create the index database

glocate --index

Search for a pattern (regex are supported out of the box)

glocate "pattern"             # case sensitive
glocate --smartcase "pattern" # case insensitive if the pattern is all lowercase
glocate --color "pattern"     # colorize the output

For a full list of options and shortcuts see the help page

glocate --help

Configuration

The 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 files

Acknowledgements

A 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.

About

glocate is a Go alternative to locate and updatedb in one command. It creates a small DB thanks to lz4 compression

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages