TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: PETE
from: A. DUMAS
date: 2020-08-10 09:06:00
subject: Re: Strange construct in

On 10-08-2020 02:15, Pete wrote:
> Coming in a month late on this, but I'm curious...
>
> Andy Burns   wrote:
>> the open square bracket is usually
>>
>> /usr/bin/[
>>
>> which might be a hard or soft link to /usr/bin/test
>>
> I'd forgotten this convention, so I went and looked... and it's not!
> I mean '[' is not a link, but an executable of its own, that's a different
> length from /usr/bin/test.  This is true on the Pi, on my Linux laptop,
> and even in Haiku. My question is, why?

I don't know. I can add that they *are* exactly the same, but different
files i.e. no hardlinks, on MacOS (and they're in /bin not /usr/bin).
Check if there are hardlinks to a file: "find /bin -samefile /bin/test"

By the way, as long as you are in Bash, you will not be using either
/usr/bin/[ or /usr/bin/test because both [ and test are shell built-ins;
Bash uses its own implementation, *not* the binaries in /usr/bin.

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.