Reputation: 11426
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?
Upvotes: 4
Views: 72
Reputation: 2020
You can just use "-f".
ln -sf /var/better orig
From man ln
-f, --force remove existing destination files
Upvotes: 8