This question already has an answer here:

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

share|improve this question

marked as duplicate by Arronical, muru, Eric Carvalho, WinEunuuchs2Unix, Pilot6 Nov 1 '16 at 10:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
open a terminal, enter ln --help or/and man ln and read it for additional information... – DJCrashdummy Oct 31 '16 at 6:22
up vote 32 down vote accepted

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

share|improve this answer
    
2 commands worked for me . one of them that is @heemayl mentioned above . and other one in current directory just ran the command ls -s /var/www/vhosts/ecash_cfe ecash_root . same worked both . good . – Waqas Rana Oct 31 '16 at 6:31
    
@heemayl isn't it the other way around? – still_dreaming_1 Feb 21 '17 at 15:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.