View Single Post
  #6   (View Single Post)  
Old 1st September 2014
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

In the Bourne shell, a 127 return code means "command not found".
  • Did you try $ glocate --help as I'd recommended?
  • If so, what was the resulting output?
  • Where is your GNU locate command installed?
With my OS, OpenBSD, the GNU locate tool is packaged with the findutils package and is installed in /usr/local/bin/glocate. This is what I get when I install findutils on my OS and then test glocate:
Code:
$ glocate --help
Usage: glocate [-d path | --database=path] [-e | -E | --[non-]existing]
      [-i | --ignore-case] [-w | --wholename] [-b | --basename]
      [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]
      [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]
      [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]
      [--max-database-age D] [--version] [--help]
      pattern...

Report bugs to <bug-findutils@gnu.org>.
$ echo $?
0
$
I also checked the version.
Code:
$ glocate --version
locate (GNU findutils) 4.5.11
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Eric B. Decker, James Youngman, and Kevin Dalley.
$
Reply With Quote