What is the most direct way to convert a symlink into a regular file (i.e. a copy of the symlink target)?
Suppose filename
is a symlink to target
. The obvious procedure to turn it into a copy is:
cp filename filename-backup
rm filename
mv filename-backup filename
Is there a more direct way (i.e. a single command)?