Having a (single, no batch filesystem processing needed) symlink, what a command line to use to turn it into a hard link to the same file?

1 Answer 1

ln -f "$(readlink <symlink>)" <symlink>
  • as a command: function soft_to_hard() { ln -f "$(dirname $1)/$(readlink $1)" $1;}
    – Elazar
    May 29, 2016 at 20:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .