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
