How to delete or replace an already created symbolic link?
ln
has -f
switch that 'forces' a symlink to be created whether it exists or not.
sudo ln -sf /home/vinaychalluru/ns-allinone-2.34/ns-2.34/ns /usr/bin/ns
sudo rm -r /usr/bin/ns
sudo ln -s /home/vinaychalluru/ns-allinone-2.34/ns-2.34/ns /usr/bin/ns
I tried ln -sf
while replacing but it didn't work for me, but doing ln -sfn directory link_name
as root
worked.