Create symlink within intellij project

10,459

Use file command to check if that file exists and to know what it is.

file /home/xxx/dev/football/site/src/ratpack/templates/index.html

if it exists, remove the current broken link with unlink command and then create a new one. I suggest to use absolute paths rather than relative paths to create the symbolic link to avoid where are you running the command from.

You are using the command correctly if you are using in the following way:

ln -s target link_name

Share:
10,459
Elliot Pohath
Author by

Elliot Pohath

Updated on June 04, 2022

Comments

  • Elliot Pohath
    Elliot Pohath almost 2 years

    I am attempting to create a symlink within my project in Intellij, I want to link the index.html from my react folder into my templates folder. I am using this command :

    ln -s react-app/build/index.html site/src/ratpack/templates/index.html
    

    However when I run gradle build I get the error

    Could not list contents of /home/xxx/dev/football/site/src/ratpack/templates/index.html Couldnt follow symbolic link

    Am I creating this symlink wrong? I am running the command from the root of my project.