glocate

faster locate using grep
git clone https://a3nm.net/git/glocate/
Log | Files | Refs | README

glocate.lz4 (228B)


      1 #!/bin/bash
      2 
      3 FILE="files"
      4 
      5 # http://stackoverflow.com/a/10836225
      6 ARGS=$(printf " %q" "$@")
      7 
      8 # grep is slower with other locales, especially -i, so LC_ALL
      9 ls ${FILE}.?.lz4 | parallel 'lz4 -dc {} | sh -c "LC_ALL=C grep '$ARGS'"'
     10