What Is Difference Between Find and Locate in Linux?
Contents

locate simply looks its database and reports the file location. find does not use a database, it traverses all the directories and their sub directories and looks for files matching the given criterion.

What is difference between find and locate command?

The find command has a number of options and is very configurable. … locate uses a previously built database, If database is not updated then locate command will not show the output. to sync the database it is must to execute updatedb command.

What is use of find & locate command in Linux?

Conclusion

  1. Use find to search for files based on name, type, time, size, ownership and permissions, in addition to some other useful options.
  2. Install and use Linux locate command to perform faster system-wide searches for files. It also allows you to filter out by name, case-sensitive, folder, and so on.
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest