Debian's which hunt
Debian's which hunt
Posted Nov 16, 2021 16:49 UTC (Tue) by nybble41 (subscriber, #55106)In reply to: Debian's which hunt by mathstuf
Parent article: Debian's which hunt
If you use `ln --relative --symlink` or `ln -rs` then the symlink target is resolved relative to the current directory (so you can use your tab completion) and the proper relative path is placed in the symlink.
$ mkdir -p a/b/c $ touch test.file $ ln -rs test.file a/b/c $ ls -l a/b/c total 0 lrwxrwxrwx 1 user group 18 Nov 16 00:00 test.file -> ../../../test.file
The --relative option was introduced in GNU coreutils 8.16.
