change target of a symbolic link shamrock - UNIX for Dummies Questions & Answers - Unix Linux Forums

  Go Back    



change target of a symbolic link

UNIX for Dummies Questions & Answers




Kindly Note - This is a Single User Post by Forum Member shamrock Regarding:
change target of a symbolic link.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old 09-23-2008
shamrock shamrock is offline Forum Advisor  
Registered User
 
Join Date: Oct 2007
Last Activity: 16 October 2014, 2:52 PM EDT
Location: USA
Posts: 1,485
Thanks: 20
Thanked 146 Times in 138 Posts
fpmurphy is absolutely correct...yes you can change the target of a soft link without deleting the old one by forcing ln to do so.

Code:
ln -s /home/Data1 /home/Stores/abc
ln -f -s /home/Data2 /home/Stores/abc