M E Fieu wrote: > Hi.. I tried to look for a file in a linux box using both locate and find , when using find I can > find my file but locate cannot. However I found sometime locate will work when I look for other > file. what is the difference between locate and find ? locate uses a snapshot of your filesystem at the time its database was created, usually nightly on a cronjob. Find is going out and looking at the filesystem right at the time that you run it. If... > [root@wa html]# locate abc.pl > [root@wa html]# find / -name abc.pl -print > find: /proc/21829/fd: No such file or directory > /usr/local/abc/abc.pl > [root@wa html]# ...abc.pl was created since the last time the slocate database was created, locate will fail to find it until it has a chance to discover it next time slocate runs. -Andy
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature