Answer the question
In order to leave comments, you need to log in
How to find a file with locate command?
Hello!
Please tell me why the locate command finds files located only in the home drive, although I search from another drive and folder?
For example:
[email protected]:/media/user/F24C56834C564291/elfkkk---------$ locate Lesson
/home/user/Public/Spanish Party. Opening traps (tricks for White). Lesson 27 (part 3).mp4
/home/user/Public/Spanish part. Black's wrong moves - how to react. Lesson 08 (part 1).mp4
[email protected]:/media/user/F24C56834C564291/elfkkk---------$
Answer the question
In order to leave comments, you need to log in
locate searches not on the disk, but on its own database. To search the disk, there is find.
locate searches not directly in the file system, but in its index file, by default /var/lib/mlocate/mlocate.db
At the same time, the actual presence of files on the disk is not checked.
Use find.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question