How to replace a symbolic link with a copy of a file it links to

command linecpfilessymlink

Having a (single, no batch filesystem processing needed) symlink, what a command line to use to replace it with a copy of the file it links to?

Best Answer

cp --remove-destination "$(readlink <symlink>)" <symlink>
Related Question