[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21290: ln --relative bug?
From: |
Pádraig Brady |
Subject: |
bug#21290: ln --relative bug? |
Date: |
Tue, 18 Aug 2015 13:17:25 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
tag 21290 notabug
close 21290
stop
On 18/08/15 04:04, Matteo Cerutti wrote:
> Hi,
>
> is this the expected behavior?
>
> # ln -s /tmp/non_existent_file b
> # ln -s --relative b c
> # ls -lrth
> total 0
> lrwxrwxrwx. 1 root root 22 Aug 18 13:03 b -> /tmp/non_existent_file
> lrwxrwxrwx. 1 root root 20 Aug 18 13:03 c -> ../non_existent_file
> #
>
>
> shouldn't c point to b?
>
> Mind that it doesn't happen when the --relative option is absent.
Are you referring to the non_existent_file
or the fact that the symlink is dereferenced before the relative adjustment?
If the latter then that's expected as detailed at:
http://www.gnu.org/software/coreutils/ln
Also included there is an example using `realpath`
which gives more control over the dereferencing.
thanks,
Pádraig.
>
> Cheers,
> Matteo