-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 ...?

rio
asked Feb 27, 2017
2 Answer
0
I will persist hardly ever that it really is awesome! The blog is normally details also typically fabricate great entitys. https://www.erodoru.com/
View More
hamzasiddique
answered May 7, 2023
0

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

View More
arunkumarak
answered Mar 3, 2017
Your Answer
||||
x
 
100:0