Your message dated Mon, 30 Jun 2008 19:14:25 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Re: Bug#488670: find behaves inconsistently when `path'
contains trailing `/'
has caused the Debian Bug report #488670,
regarding find behaves inconsistently when `path' contains trailing `/'
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)
--
488670: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488670
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: findutils
Version: 4.2.27-3
It seems that the `-name' behaves inconsistently when one of the
`path's given contain a trailing slash:
$ find /tmp/ -name tmp/ -and -printf 'Found: %p\n'
find: warning: Unix filenames usually don't contain slashes (though pathnames
do). That means that '-name tmp/' will probably evaluate to false all the time
on this system. You might find the '-wholename' test more useful, or perhaps
'-samefile'. Alternatively, if you are using GNU grep, you could use 'find ...
-print0 | grep -FzZ tmp/'.
Found: /tmp/
$
Please note that it isn't possible to use just /DIRECTORY as the
`path', since then the symbolic link won't be followed:
$ find /SYMLINK-TO-A-DIRECTORY
/SYMLINK-TO-A-DIRECTORY
$ find /SYMLINK-TO-A-DIRECTORY/
/SYMLINK-TO-A-DIRECTORY/
/SYMLINK-TO-A-DIRECTORY/FOO
...
$
--- End Message ---
--- Begin Message ---
Version: 4.4.0-
On 2008-06-30 Ivan Shmakov <[EMAIL PROTECTED]> wrote:
> Package: findutils
> Version: 4.2.27-3
> It seems that the `-name' behaves inconsistently when one of the
> `path's given contain a trailing slash:
> $ find /tmp/ -name tmp/ -and -printf 'Found: %p\n'
> find: warning: Unix filenames usually don't contain slashes (though pathnames
> do). That means that '-name tmp/' will probably evaluate to false all the
> time on this system. You might find the '-wholename' test more useful, or
> perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use
> 'find ... -print0 | grep -FzZ tmp/'.
> Found: /tmp/
The version in sid/lenny (4.4.0) won't show "Found: /tmp/" with the
abovementioned commandline.
> $
> Please note that it isn't possible to use just /DIRECTORY as the
> `path', since then the symbolic link won't be followed:
I think you are mixing up search paths, .ie. where find actually
searches (the very first argument) and arguments to the -path option.
The warning is about "-name tmp/", not about the search path.
If you want to find *directories named "tmp" in
/tmp simply use "find /tmp -name tmp -type d -print".
cu andreas
--- End Message ---