-1

How can I search a particular directory using 'slocate' (locate, mlocate)? It seems that, unlike 'find', slocate does not provide an option for the directory to search in, so at this moment I just do

slocate file_name | grep "/home/"

but have a feeling that this is not the best option.

Thanks in advance for insightful comments.

John Smith
  • 1,027
  • 15
  • 31

1 Answers1

0

Have you tried with slocate + directory, for example if you wanto to locate home directory:

slocate home/
Manolete
  • 3,431
  • 7
  • 54
  • 92