3 ms·
Actually, ln takes arguments in the same order as cp and mv. It's always `cmd existing-file... new-name`. ln only gets confusing because the file that exists i
by thequux 4y ago
Actually, ln takes arguments in the same order as cp and mv. It's always `cmd existing-file... new-name`.
ln only gets confusing because the file that exists is the target of the link, so it may be natural to think of the link as going from the last name on the command line to the earlier ones, but really the mental model should be in names that either exist or are to be created.
- SAI_Peregrinus 4y agoTrue, if you develop the mental model you described, instead of the `cmd source destination` model. The `help` text for GNU coreutils `cp` starts with `Usage: cp [OPTION]... [-T] SOURCE DEST`. The `help` text for GNU coreutils `ln` starts with `Usage: ln [OPTION]... [-T] TARGET LINK_NAME`. The man pages & help text aren't conducive to building the `cmd old new` mental model. `dd` makes it more explicit.