Qual é a diferença entre locate e which ?
locate usa um banco de dados criado anteriormente para localizar o arquivo.
locatereads one or more databases prepared byupdatedb(8) and writes file names matching at least one of the PATTERNs to standard output, one per line.
Fonte locate (1) - Página man do Linux
updatedbcreates or updates a database used bylocate(1). If the database already exists, its data is reused to avoid rereading directories that have not changed.
updatedbis usually run daily bycron(8) to update the default database (/var/lib/mlocate/mlocate.db)
Fonte updatedb (8) - Página man do Linux
which procura por um arquivo executável procurando-o nos diretórios na variável PATH environmental.
whichtakes one or more arguments. For each of its arguments it prints tostdoutthe full path of the executables that would have been executed when this argument had been entered at the shell prompt. It does this by searching for an executable or script in the directories listed in the environment variablePATH.
usando o mesmo algoritmo de bash (1).
Fonte qual (1) - página man do Linux
locate mentor lista o mentor, mas which mentor diz "nenhum mentor em ..."
What does that mean?
Você tem alguns arquivos chamados mentor , que podem ser encontrados no banco de dados locate .
Você não tem um arquivo ou script executável chamado mentor no seu PATH .