150

I want to create a symlink that should point to another directory.

Like inside directory /var/www/vhosts/ecash-staging.com/ should be a symlink named as ecash_root that should pointing to --> /var/www/vhosts/ecash_cfe.

How is this possible ?

I have googled but there some people said that there should be a dir ecash_root exist in /var/www/vhosts/ecash_cfe/... but I do not want that.

i just have to create symlink in /var/..../ecash-staging.com/ name as ecash_root that should point to /var/www/vhosts/ecash_cfe but should not be a ecash_root dir inside /var/www/vhosts/ecash_cfe.

thanks to all

muru
  • 207,228
Waqas Rana
  • 1,611

1 Answers1

206

Use ln:

ln -s /var/www/vhosts/ecash_cfe /var/www/vhosts/ecash-staging.com/ecash_root
  • -s stands for symbolic link

  • /var/www/vhosts/ecash_cfe is the source file

  • /var/www/vhosts/ecash-staging.com/ecash_root is the link name

heemayl
  • 93,925