-2

I want to add a symbolic link to another folder I want to say ln -sf / var / www / html to
/home / var / exemple / public This is good. / home / var / example / public belongs to a user who creates. in any case this is fine to do in production

sandro
  • 1
  • 3
    Can you please rephrase the question and explain me what exactly you're trying to ask and do in here. – Tintin Apr 01 '19 at 03:20
  • 1
    Read man 7 symlink – waltinator Apr 01 '19 at 04:24
  • "exemple" -> "example" Typo in text or type in the command? :-) – Rinzwind Apr 01 '19 at 07:59
  • 1
    Welcome to [ubuntu.se]! Please [edit] your question to tell us what your goal is (where should be the symlink? where is the target?) and describe what the desired effect is and what you are getting instead. Copy the exact issued command into your question. If you get any error messages, copy them, too. Don’t forget to apply code formatting for pasted terminal text. Make sure you don’t enter paths with spaces around slashes to your terminal as you did in the question body. – Melebius Apr 01 '19 at 08:09

1 Answers1

1

To create a symbolic link of /var/www/html in /home/var/example/public, you can

ln -s /var/www/html /home/var/example/public

maybe you meant the destination folder as ~/public which will be in the same user.

  • Now I have a problem creating the link (ln -s /var/www/html /home/var/example/public) the html folder is created and it will not let me use the public folder how to fix it – sandro Apr 02 '19 at 14:14
  • Correct me if i am wrong but from what i understand you mean that there was an html folder created inside the public folder and instead you wanted the public folder to have the contents of the html folder? if so the delete the public folder and re run command. it will not create the html folder inside public but instead public folder will be the symlink folder. – Habeel Mazhar Apr 03 '19 at 09:07
  • Glad to help. Please mark the answer as accepted if it helped. Thanks – Habeel Mazhar Apr 09 '19 at 11:55