Symbolic link is a special kind of link that points to another file.
After created, a link target file is replaced as source file.
How to create symbolic link
ln -s <source file name> <link target file name>
e.g.
$ ln -s /usr/local/bin/ruby /usr/bin/ruby
$ ls -alt /usr/bin/ruby
/usr/bin/ruby -> /usr/local/bin/ruby
e.g.
$ ln -s /usr/local/bin/ruby /usr/bin/ruby
$ ls -alt /usr/bin/ruby
/usr/bin/ruby -> /usr/local/bin/ruby
How to remove symbolic link
use unlink or rme.g.
unlink /usr/bin/ruby
rm /usr/bin/ruby
No comments:
Post a Comment