How to replace a symbolic link with a copy of a file it links to? cp --remove-destination "$(readlink <symlink>)" <symlink>