Sunday, 29 August 2010

How to create & delete symlink

How to create and delete a symlink?

* How to create symlink :-

# cd /

# ln -s /home/user/exampless examples

You would be creating a symbolic link called "examples" in the root directory, and it would be a reference to the /home/user/examples file.

To see this, you would:

# cd /

# ls -l

And the ls output would show you the standard directory listing with symbolic links maked with arrows, like this:

lrwxrwxrwx 1 user user 13 Aug 30 2010 examples -> ../home/user/examples

How to create and delete a symlink?* How to create symlink :-# cd /# ln -s /home/user/exampless examplesYou would be creating a symbolic link called "examples" in the root directory, and it would be a reference to the /home/user/examples file.
To see this, you would:# cd /# ls -l
And the ls output would show you the standard directory listing with symbolic links maked with arrows, like this:lrwxrwxrwx 1 user user 13 Aug 30 2010 examples -> ../home/user/examples

II] How to delete a symlink?

You can delete either by rm command or unlink command :

$ unlink symbolic_link

or

$ rm symbolic_link

No comments:

Post a Comment