I have a /usr/local directory declared like that in my rc.local file:
cd /usr
ln -sP …/fs/hd0-qnx4/usr/local local
If I try to find the file /usr/local/include/foo.h with the following
command:
find /usr/local -name foo.h
finds the file
find / -name foo.h
finds the file in /fs/hd0-qnx4/usr/local/include/foo.h but not in
/usr/local/inlcude
and:
find /usr -name foo.h
doesn’t find anything !?
what’s wrong?
Alain.
On Mon, 30 Apr 2001 13:46:21 +0200, Alain Bonnefoy
<alain.bonnefoy@icbt.com> wrote:
I have a /usr/local directory declared like that in my rc.local file:
cd /usr
ln -sP …/fs/hd0-qnx4/usr/local local
If I try to find the file /usr/local/include/foo.h with the following
command:
find /usr/local -name foo.h
finds the file
Should not.
find / -name foo.h
finds the file in /fs/hd0-qnx4/usr/local/include/foo.h but not in
/usr/local/inlcude
and:
find /usr -name foo.h
doesn’t find anything !?
what’s wrong?
I guess that when find searches ‘/usr’ (or ‘/usr/local’)
it expands the symbolic link ‘local’ to ‘…/fs/…’, which is not
in ‘/usr’ (’/usr/local’). When it searches ‘/’, the resulting
expansion is in ‘/’. Try find /usr (or /usr/local) -follow (or
-logical) -name foo.h.
Alain.