Thursday, November 11, 2010

Creating a Symbolic Link in Linux

type which java to get the current location of the link, remove the link with rm then recreate the link pointing to the new version.

#which java
/usr/bin/java
#ls -ld /usr/bin/java
lrwxrwxrwx 1 root other 16 Apr 8 12:41 /usr/bin/java -> ../java/bin/java
#rm /usr/bin/java
#ln -s /usr/bin/j2re1.4.2_17/bin/java /usr/bin/java
#ls -ld /usr/bin/java
lrwxrwxrwx 1 root other 30 May 28 15:30 /usr/bin/java -> /usr/bin/j2re1.4.2_17/bin/java

No comments:

Post a Comment