Not able to get desired output for locate command

Hi I am not able to get the output for locate command
bob@caleston-lp10:~$ locate caleston-code
bash: locate: command not found

its not the problem with the output.
The comamnd itself is not present in the system or its not available in $PATH

In case its the first issue ( command not installed on system ) : you may have to install the command if you have correct permissions

in second case ( command not in path ) :

  1. locate the command first ( find / -name “locate” 2>/dev/null )
    if you find the full path of “locate” command
  2. execute the command with full path , which is in your case
1 Like