I have an existing file which I'm replacing with a symlink to another file. So I basically need to do this:
rm orig
ln -s /var/better orig
I DRYed the above to this:
{rm,ln\ -s\ /var/better}\ orig\;
But it no longer works. The shell now complains:
-bash: rm orig;: command not found
Is there a way to make the DRY form work?
You can just use "-f".
ln -sf /var/better orig
From man ln
-f, --force remove existing destination files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With