Featured

    Featured Posts

Locate command

The locate command searches a database of filenames that Linux maintains. Unlike the find command, which can find files by permissions, owner, file size, etc, the locate command finds files only by their name.
This command does not search your system live. Instead, it has its own database that it usually updated once a night or once a week. This means that locate may not find files added since the last database update.
Here is an example:
linux locate command
What if we try to find a file that was recently added? Well, if the database wasn’t updated, we won’t get any result with when using the locate command:
linux locate new file
To avoid this, we need to update the database manually. This is done using the updatedb command. After the update, we should be able to find recently added files:
linux updatedb command
NOTE – because locate works from a database, it’s typically much faster than find.
author

Author Name

Author Description!

Get Free Email Updates to your Inbox!

Post a Comment

www.ccna.ma

yu
Powered by Blogger.

Translate

Copyright © Learn Linux Th3pro.xyz | Blogger Templates | Designed By Code TAOUSSI