On 03/15/2017 09:31 AM, Alarig Le Lay wrote: > On mer. 15 mars 09:10:26 2017, the...@sys-concept.com wrote: >> Yes, I run as root: updatedb >> But when run: >> locate consent_extraction* >> >> It only list one file: >> /home/fd/consent_extraction1.pdf (this is a link file) >> /home/fd/business/forms/consent_extraction1.pdf >> >> It can not find: "consent_extraction.pdf" both files are in same directory >> >> ll business/forms/ >> total 688 >> ... >> -rw-r--r-- 1 fd fd 63032 Mar 15 08:52 consent_extraction1.pdf >> -rw-r--r-- 1 fd fd 397649 Mar 14 20:05 consent_extraction.pdf >> >> I observe the same behaviour on my local machine and remote machine. >> >> Running "find" finds both files >> >> find . -name '*consent_extraction*' >> ./business/forms/consent_extraction.pdf >> ./business/forms/consent_extraction1.pdf >> ./consent_extraction1.pdf >> >> Why? > > Hi, > > Do you have file consent_extraction1.pdf in your working directory? In > that case, your shell will begin by expending your asterisk and you will > really look for consent_extraction1.pdf.
It is a strange behaviour :-/ Yes, I had a link "consent_extraction1.pdf" in a working directory and locate could only locate: consent_extraction1.pdf It could not find: consent_extraction.pdf When I removed "consent_extraction.pdf" from my working directory. run "updatedb" and "locate *consent_extraction*" found both files "locate consent_extraction" found both files "locate consent_extraction*" didn't find any files The "*" is is messing up the search. I was under impression the "*" will match any character including extensions. -- Thelma