I have a number of files in /etc/rc3.d/
directory which all are symbolic links and point to files in /etc/init.d/
directory using ../init.d/
designation. For example file S18rsyslog
in /etc/rc3.d/
directory is a symbolic link to file /etc/init.d/rsyslog
, but according to ls -l
, /etc/rc3.d/S18rsyslog
does not point to /etc/init.d/rsyslog
but ../init.d/rsyslog
instead:
# ls -l /etc/rc3.d/S18rsyslog
lrwxrwxrwx 1 root root 17 30. jun 15:05 /etc/rc3.d/S18rsyslog -> ../init.d/rsyslog
#
What is the advantage to keep symbolic links relative to directory? Because this allows one to move the direcoty itself without breaking the symbolic links? In addition, is it possible to create a symbolic link with ..
(parent directory) in the path without being in the directory? ln -sv '/etc/init.d/rsyslog' '/etc/rc3.d/../init.d/rsyslog'
obviously does not work as symlink is created into /etc/init.d/
directory while I would like to have symlink named ../init.d/rsyslog
in the /etc/rc3.d/
directory.