Hacker News new | ask | show | jobs
by jrockway 4872 days ago
The confusion comes from understanding what the target of a link is. Of course, it's not the new file you're creating, it's the source. But if you were copying the file, then the target would be the destination.

Hence the confusion, I guess.

(I don't think I've ever read the ln man page. I learned it by trying it both ways until I learned which way was correct.)

2 comments

OpenBSD always has great documentation: http://www.openbsd.org/cgi-bin/man.cgi?query=ln

  SYNOPSIS
     ln [-fhns] source [target]
     ln [-fs] source ... [directory]
Not to mention the detailed description as well as informative examples.
I admit it's confusing, but I don't think it can be put much more succinctly than the man page makes it. The part where the name of the link itself is called "link name" really drives the point home.

I definitely refer to ln more than any other man page... Every time I use ln I say "target, link name" in my head.