Re: Conditional SymLinks

Adam D. Bradley (
Sat, 13 Dec 1997 01:58:34 -0500 (EST)

> Hmm. We actually seem to already have this functionality in the kernel --
> to some extent, at least.
> Following a symlink tonight, I found:
> [cananian@cananian /lib]# ls -l cpp
> lrwxrwxrwx 1 root root 42 Nov 17 20:53 cpp -> ../usr/lib/gcc-lib/*linux*/
> [cananian@cananian /lib]# ls ../usr/lib/gcc-lib
> i386-linux i586-unknown-linux-gnulibc1
> [cananian@cananian gcc-lib]# echo *linux*
> i386-linux i586-unknown-linux-gnulibc1
> So it seems that *linux* is a 'magic' string of the type we were
> discussing. Someone want to chase this down in the kernel and see if
> there are other 'magic' strings defined? *uid* perhaps? =)
> I don't think this is a shell thing. I may be wrong.

I think this is your shell globbing. Do a "set noglob" and then "echo
*linux*", it'll just spit "*linux*" right back at you. And I tried
building a symlink like the one you show... it's useless. Try
executing it with "./cpp" or try doing "file ./cpp" in the directory
with the link, I'll wager they'll report "not found" and "broken
symbolic link", respectively.

What distribution are you using, that sets up /lib/cpp like that?
Or was that done by a gcc "make install"? Hmm...


Things look so bad everywhere      Adam D. Bradley
In this whole world what is fair        Boston University Computer Science
We walk blind and we try to see             Ph.D. student and Linux hacker
Falling behind in what could be  ---->  Bring me a Higher Love  ---->  <><