Find or Locate files in Linux OS

Find or Locate files in Linux OS


Difference between find and locate command? #

locate uses previously built database, if the database is not built, locate will not work.

sudo updatedb # to build the database
find / -name data.txt
# vs
locate data.txt

Todo #

  • cron job to build this database regularly


No notes link to this note

Previous Next