On 11/26/2015 10:32 AM, Felipe Matas wrote:
Did you mean 'ln' rather than 'ls' in the subject line?
> Hi, well this happend when we try to make a symbolic link with a relative when the dist directory is a subdirectory.if you repeat this examples with a full path it works.
> Ex, in bash
> mkdir bmkdir cecho "hi" > b/aln -s b/* c/## here when we do 'cat c/a' we get: No such file or directory - The link existrm c/aln -s b/a c/## here when we do 'cat c/a' we get: No such file or directory - The link exist
Your (lack of) formatting made your report practically impossible to
read. Would you mind resending your post in a legible format?
However, if I deciphered correctly, you did:
mkdir b c
echo hi > b/a
ln -s b/* c/
Try doing it again with -v to see what actually was done:
$ ln -sv b/* c/
‘c/a’ -> ‘b/a’
That is, the contents of the link at 'c/a' is literally the string 'b/a'
- even though that string does not resolve to any location available
from 'c'. However, this is not a bug; it is the behavior that POSIX
requires for 'ln -s'.
You may be interested in trying 'ln --relative -sv b/* c/' instead,
which creates 'c/a' as a symlink to '../b/a', and therefore resolves
rather than creating a dangling symlink.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org