- TFA says that `ln` is "used to create symbolic links, among other things"; I'd drop "symbolic"--that is needlessly restricting what it does. It just creates filesystem links; hard or soft.
- TFA says, "tar is actually short for TApe aRchive". The "a" should belong to "archive" ("Tape ARchive"); this is because of it's relation to the older `ar` ("ARchive") command.[^1]
- TFA says, "the filename is actually part of the f flag, and therefore must directly follow it." That's actually not the case for the "dash-less" form of tar invocation; all of the flags go in one string, and then the arguments follow in the same order, rather than right after the associated flag. For example, if I wanted to specify both the "f" and "C" flags, it (c|w)ould be something like `tar cfC argument-to-f argument-to-C`. That said, modern tars also support `tar -c -f argument-to-f -C argument-to-C`.
As TFA says, this isn't inherently wrong, it's just different than everything else (I know of no other command that uses that flag syntax[^2]). Understand that it predates the standard convention that everything else follows.
[^1]: Today ar is pretty much only used for creating .a files containing library objects for static linking. It may be noteworthy that the argument order of ar is ALSO "archive-name members..." despite archive-name NOT being an argument to an "-f"-like flag.
[^2]: Actually, come to think of it, `ps` might take that syntax, depending on your system.
"Source = from", "target = to" is how I interpret that. Then if you look at some existing link, you'll see it as:
my_link --> real_directory
In the direction of the arrow: from, to. But to create that link, the command would really be
$ ln real_directory my_link
The link target/real path is the source and the link to create is the target.
My brain thinks it breaks the idiom of `[cmd] [from] [to]` that cp, mv, etc use. You wouldn't say the example above is a link from real_dir to my_link, you'd say the opposite (and that's what the cli shows when you ls a link).
I agree that ln is a little confusing. I've often explained it to people that it's the same order as if you were copying the file, but it creates a link instead.
Also, in sections 1 and 8 (shell), data typically flows from left-to-right across the line. The filename on the left flows into the link on the right. Data flows from the left of the pipe to the right.
Whereas in section 3 (C), data typically flows from right-to-left across the line. Variable assignment, memcpy, ...
There are of course exceptions (dup2, bcopy), but that's the general style for the order of arguments in *nix.
I haven't seen it in any programs other than old research UNIX era utilities and their modern implementations. In that context, they're often called "traditional" or "old style" invocation.
Do you have any examples of modern utilities using a dash-less syntax?
- TFA says that `ln` is "used to create symbolic links, among other things"; I'd drop "symbolic"--that is needlessly restricting what it does. It just creates filesystem links; hard or soft.
- TFA says, "tar is actually short for TApe aRchive". The "a" should belong to "archive" ("Tape ARchive"); this is because of it's relation to the older `ar` ("ARchive") command.[^1]
- TFA says, "the filename is actually part of the f flag, and therefore must directly follow it." That's actually not the case for the "dash-less" form of tar invocation; all of the flags go in one string, and then the arguments follow in the same order, rather than right after the associated flag. For example, if I wanted to specify both the "f" and "C" flags, it (c|w)ould be something like `tar cfC argument-to-f argument-to-C`. That said, modern tars also support `tar -c -f argument-to-f -C argument-to-C`.
As TFA says, this isn't inherently wrong, it's just different than everything else (I know of no other command that uses that flag syntax[^2]). Understand that it predates the standard convention that everything else follows.
[^1]: Today ar is pretty much only used for creating .a files containing library objects for static linking. It may be noteworthy that the argument order of ar is ALSO "archive-name members..." despite archive-name NOT being an argument to an "-f"-like flag.
[^2]: Actually, come to think of it, `ps` might take that syntax, depending on your system.