On Tue, Jan 07, 2003 at 03:58:36PM +0100, Piotr Krukowiecki wrote:
> find does not follows symlinks to directories - i think it should.
> They are noted as links, for example:
> lrwxrwxrwx   1 1234     1234           25 Dec 31  2002 Anime -> /mnt/hdc1/Anime/

This mirrors find(1) behavior.  The real find option to follow symlinks
is -follow; we could implement that (as --follow).

It's been a while since I've played with FindJob, though, so I'm not
sure how much work this would be.  In the case that a file is a symlink,
we'd need to find out the symlink target's type (which might be a
symlink; recurse, check for loops).

It'd also need to do something about infinite recursion.  Real find(10
keeps track of visited inodes; we can't do that, so the best we can do
is probably to keep track of visited paths.

> Even after cd /Anime find won't work :(

This is a bug, however.  The problem is that it's checking the first
path ("." in /Anime) like any other argument, seeing it's a symlink, and
not recursing (it only recurses on directories).  I think the solution
is the same as the above, except only on top-level stack entries.

-- 
Glenn Maynard

Reply via email to