Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: grammar triviality with '&&'
02.03.2015, 23:18, "Kurtis Rader" <krader@xxxxxxxxxxxxx>:
> On Mar 2, 2015 11:03 AM, "ZyX" <kp-pav@xxxxxxxxx> wrote:
>> Why hardlink and why in /bin?
>>
>> % la /usr/bin/{test,\[}
>> -rwxr-xr-x 1 root 39K янв 31 04:03 /usr/bin/[*
>> -rwxr-xr-x 1 root 35K янв 31 04:03 /usr/bin/test*
>>
>> : you see there is a 4K difference. Not sure why, but both belong to
>
> coreutils package.
>
> A hardlink simply attaches a name to a file in UNIX like OSs. You can give
> a file multiple names by creating multiple hardlinks. These commands are
> normally in /bin because in the past the root and /usr file systems were
> separated and those commands were needed before /usr was mounted.
>
> It is strange that those two commands point to different programs on your
> computer. It may be a simple mistake. Or maybe the maintainers of your
> distro did it to maximize compatibility among the ancient and less ancient
> parts of the distro.
I do not think this is a mistake. And I found at least two differences:
1. `command test --help` returns zero, `command \[ --help` displays help.
2. `[` requires `]` (unless it received `--help` or `--version`), no matter what name it is called with, `test` requires not.
Note that coreutils ebuild does *not* contain any references to `test` or `[`, patches as well do not (except when Makefile is patched not to regenerate man pages). This means that this difference is created by GNU developers, *not* by distro maintainers.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author