Question: 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)?

Answer: 
On OSX 

> 
> rsync `readlink bar.pdf` bar.pdf
> 
> 
>
Rsync can nativly deference the symlink for you using -L flag.

```
[user@workstation ~]$ rsync -h | grep -- -L
 -L, --copy-links            transform symlink into referent file/dir

```

It would be as simple as: `rsync -L <symlink> <destination>`