LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   symbolic link in /lib (http://www.linuxquestions.org/questions/linux-software-2/symbolic-link-in-lib-287468/)

alice95089 02-07-2005 08:17 PM

symbolic link in /lib
 
Hi all,
I would like to ask why there are lot of symbolic link in the /lib directory?
Why dont we just use the desired hard link library?

lrwxrwxrwx 1 root root 19 Sep 18 15:15 libnss_dns.so.2 -> libns
s_dns-2.3.2.so
-rwxr-xr-x 2 root root 51K Mar 13 2003 libnss_files-2.3.2.so
lrwxrwxrwx 1 root root 21 Sep 18 15:15 libnss_files.so.2 -> lib
nss_files-2.3.2.so
-rwxr-xr-x 2 root root 20K Mar 13 2003 libnss_hesiod-2.3.2.so
lrwxrwxrwx 1 root root 22 Sep 18 15:15 libnss_hesiod.so.2 -> li
bnss_hesiod-2.3.2.so
-rwxr-xr-x 1 root root 1.8M Jan 25 2003 libnss_ldap-2.3.1.so
lrwxrwxrwx 1 root root 20 Sep 18 15:19 libnss_ldap.so.2 -> libn
ss_ldap-2.3.1.so
-rwxr-xr-x 2 root root 42K Mar 13 2003 libnss_nis-2.3.2.so
-rwxr-xr-x 2 root root 51K Mar 13 2003 libnss_nisplus-2.3.2.so
lrwxrwxrwx 1 root root 23 Sep 18 15:15 libnss_nisplus.so.2 -> l

Thanks
alice

slakmagik 02-07-2005 08:28 PM

Just a guess, but probably because you'd have to delete 'both' libraries and then install 'two' libraries and make sure you got it right. (On a library upgrade I mean.) With symlinks, you just switch the 'real' one and the symlink still applies. Not really sure though. Hard links can't (or couldn't - not sure if it's still true) span filesystems either - doesn't apply to /lib but that'd be a good reason to use symlinks elsewhere.


All times are GMT -5. The time now is 09:24 PM.