Monday, September 24, 2012

How to create symbolic link in unix or linux?


To create a symbolic link in Unix or Linux, at the shell prompt, enter the following command:

surya# ln -s {target-filename} {symbolic-filename}

For example create softlink for /webroot/home/httpd/test.com/index.php as 

/home/surya/index.php,

enter the following command:

#ln -s /webroot/home/httpd/test.com/index.php /home/surya/index.php



How to check symbolic link is created or not?


#ls -l

lrwxrwxrwx 1 surya  surya    16 2012-09-24 16:53 index.php -> 
/webroot/home/httpd/test.com/index.php

1 comment: