Javatpoint Logo
Javatpoint Logo

Linux locate

The command locate and find are used to search a file by their filename. But difference is that locate command is a background process and searches the file in database whereas, find command searches in filesystem. The locate command is much faster than find command.

If you are unable to find a file with locate command then it means that your database is out of date, and you can updte your database with the updatedb command.

Syntax:

Example:

Linux Locate

Look at the above snapshot, command "locate sysctl.conf" has displayed all the locations of file 'sysctl.conf'.

Next TopicLinux Date




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA