-1

What is the difference between find and locate command

Hi..,

am recently using both find and locate command to search files in linux...my question is what is

the difference between both find and locate command...which is better to find files ...?

Locate command find command Add a comment
rio
asked Feb 28 2017

Answer

-1
I will persist hardly ever that it really is awesome! The blog is normally details also typically fabricate great entitys. https://www.erodoru.com/
Add a comment
hamzasiddique
asked May 07 2023
edited May 08 2023
Post your Answer
-1

both find and locate are used to search the file and directory in linux...using find command you have to mention that

particular path to search particular file.., but locate command dosen't required this method it will search through

updatedb. locate is very fast to search but less accurate compare to find........

for example:-

am going to search apache configuration file httpd.conf through find command.

[root@localhost ~]# find /etc/httpd/ httpd.conf

/etc/httpd/

/etc/httpd/conf

/etc/httpd/conf/magic

/etc/httpd/conf/httpd.conf

same httpd.conf file am going to search through locate command...

[root@localhost ~]# locate -l 2 httpd.conf

/etc/httpd/conf/httpd.conf

/etc/sysconfig/ha/conf/httpd.conf

Add a comment
arunkumarak
asked Mar 03 2017
edited Oct 05 2018
Post your Answer