Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
find (and locate)
  • From: Martin Deppe <Martin.Deppe@xxxxxx>
  • Date: Sat, 05 Mar 2005 11:57:35 +0100
  • Message-id: <4229909F.8080506@xxxxxx>
Hi friends,

after having had this discussion some time ago I installed "locate" (hint from and thanks to Randall) and use it now from time to time.

At the time we had this discussion here before I had a quite strange setup regarding my filesystems and symbolic links from within one filesystem to within another one. Therefor I didn't inspect this problem further.

But now I experienced the following again:

"locate" today didn't show me a file which IS there and definitely should have been in its database so I tried "find" which resulted in me putting this issue up again. The situation is as follows:

OS: SuSE Linux 9.2 (and still up to date)

Relevant filesystems:
/dev/hdc7 mounted on / (maybe even not relevant)
/dev/hdc8 mounted on /home

Directories:
/home/martin
/home/martin/Win95/Business/Wolfgang Stoeger/Recherchen

Symbolic links:
/home/martin/2Wolfgang Stoeger -> Win95/Business/Wolfgang Stoeger

File(s):
/home/martin/Win95/Business/Wolfgang Stoeger/Recherchen/TJ1961_02.pdf

While I wrote this "updatedb" updated "/var/lib/locatedb". After that: still the same.

While being in "/home/martin" the following commands gave the following results:

martin@martin4:~> find . -name TJ1961_02.pdf -ls
64515 204 -rw------- 1 martin users 205597 Dec 27 12:00 ./Win95/Business/Wolfgang\ Stoeger/Recherchen/TJ1961_02.pdf

martin@martin4:~> find . -follow -name TJ1961_02.pdf -ls
find: ./.wine/dosdevices/a:: No medium found
find: ./.wine/dosdevices/d:: No medium found
find: . changed during execution of find

As far as I am concerned "find" in the second case should have found TWO files, which are:
64515 204 -rw------- 1 martin users 205597 Dec 27 12:00 ./Win95/Business/Wolfgang\ Stoeger/Recherchen/TJ1961_02.pdf
64515 204 -rw------- 1 martin users 205597 Dec 27 12:00 ./2Wolfgang\ Stoeger/Recherchen/TJ1961_02.pdf

So, WHY DOESN'T DO IT FIND ANY FILE? I used THE SAME command by pressing Ctrl-p and editing that command to insert "-follow".

So Randall, you did insist on the "fact" that there is no such (or any) problem with find (since it behaves as it is intended to). I really don't want to prove you wrong, but do you still think so? I am simply interested in a solution for that.

Did anybody find the error and correct it already?

Best wishes
Martin
--
Martin Deppe
Bramfelder Chaussee 30 c
D-22177 Hamburg
Tel: +49-(0)40-69 21 38 99
Handy: +49-(0)171-94 778 59
Fax: +49-(0)40-2549 1651
eMail: Martin.Deppe@xxxxxxxxxx


< Previous Next >
Follow Ups