How do I replace a symlink with the actual file? I want to remove the symlink and instead insert the file it links to, if possible all with one command so I can have it as an "External Tool" in phpStorm.
cp --remove-destination "$(readlink &lt;symlink&gt;)" &lt;symlink&gt;


Source: https://unix.stackexchange.com/a/35027