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

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

 Cannot upload images to phpBB posts

The issue is mainly occurring due to the absence of some code. To fix this issue, do the...

 How to Change Your FTP Port

Lately FTP has been a problem for a lot of hosting providers. Especially since the recent influx...

 Child pid xxx exit signal Segmentation fault (11)

Sometimes apache is crashing and all or some PHP pages are showing blank when you browse it. Also...

 Mailman Error “Bug in Mailman version 2.1.11.cp3?

If you are getting following error when trying to modify mailinglist then execute following...

 How to stop generating core files

You may come across core files which gets generated within your accounts . The possible reason...