Re: [ in /usr/bin Question



On Wed, 2007-05-09 at 18:01 +0200, Mathias Brodala wrote:
Hi Greg.

Greg Folkert, 09.05.2007 17:37:
On Wed, 2007-05-09 at 21:07 +0800, Wang Xu wrote:
On Wed, May 09, 2007 at 09:01:50AM -0400, Tom Grove wrote:
Hello all...I am new to this Debian thing :-) I used it in the Woody
days but moved over to the FreeBSD world for the last few years. I
recently installed Testing (Lenny) and see the left bracket in my
/usr/bin directory and do not know what it is. When I ls -al it I get:

-rwxr-xr-x 1 root root 24752 2007-01-30 13:51 /usr/bin/[

This leads me to believe that it was installed with the base system or
some package because I just installed the system earlier this week. Any
help is much appreciated. Thanks.
it is test(1)

greg@princess:~$ dpkg -S /usr/bin/\[
dpkg: /usr/bin/[ not found.
greg@princess:~$ file /usr/bin/\[
/usr/bin/[: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), stripped
greg@princess:~$ which test
/usr/bin/test
greg@princess:~$ ls -l /usr/bin/\[ /usr/bin/test
-rwxr-xr-x 1 root root 24984 2006-08-16 07:52 /usr/bin/[
-rwxr-xr-x 1 root root 23024 2006-08-16 07:52 /usr/bin/test
greg@princess:~$ /usr/bin/\[
/usr/bin/[: missing `]'
greg@princess:~$ /usr/bin/test
greg@princess:~$

Hmmm. I wonder what this all means.

That "[" and "test" actually do the same but "[" has a bit more code in it. (For
checking for the closing "]" and for the output of "--help" and such, I guess.)

I’m not sure what you are wondering now.

Yes, you hit exactly the wondering.

Looks like Bob McGowan also wonders why. I was used to seeing it as a
hardlink to test.

He states it much better than I, on this subject.
--
greg, greg@xxxxxxxxxxxxxxx
PGP key: 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
Alternate Fingerprint: 09F9 1102 9D74 E35B D841 56C5 6356 88C0

Attachment: signature.asc
Description: This is a digitally signed message part



Relevant Pages

  • Re: [ in /usr/bin Question
    ... recently installed Testing (Lenny) and see the left bracket in my ... This leads me to believe that it was installed with the base system or ... This is open source, so why wonder? ...
    (Debian-User)
  • Re: [ in /usr/bin Question
    ... recently installed Testing (Lenny) and see the left bracket in my ... This leads me to believe that it was installed with the base system or ...
    (Debian-User)
  • Re: [ in /usr/bin Question
    ... recently installed Testing (Lenny) and see the left bracket in my ... This leads me to believe that it was installed with the base system or ...
    (Debian-User)
  • Re: Re: Bug???
    ... Od: Greg Folkert ... When was this testing version of Debian downloaded? ... It's Lenny, and i think it was downloaded 11 may... ... Or if it is a hand built machine, we need to know the make and models ...
    (Debian-User)