Gentoo Archives: gentoo-user

From: Alexander Skwar <listen@×××××××××××××××.name>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] strange [ file
Date: Tue, 25 Jul 2006 11:13:03
Message-Id: 44C5FA58.4070706@mid.message-center.info
In Reply to: Re: [gentoo-user] strange [ file by Dirk Heinrichs
1 Dirk Heinrichs wrote:
2 > Am Dienstag, 25. Juli 2006 11:00 schrieb ext Arnau Bria:
3 >
4 >> I've seen a file named "[" in my /usr/bin ...
5 >> [...]
6 >>
7 >> does any one know what could it be?¿
8 >
9 > It's the [ from "if [ condition ]; then ...", a shortcut for /usr/bin/test.
10
11 Nope, not correct.
12
13 [09:39:58 vz6tml@dewup-ww02:~] $ type [
14 [ is a shell builtin
15 [13:01:25 vz6tml@dewup-ww02:~] $ type test
16 test is a shell builtin
17
18 And actually /usr/bin/[ and /usr/bin/test aren't even the same:
19
20 [13:01:56 vz6tml@dewup-ww02:~] $ ls -la /usr/bin/{[,test}
21 -rwxr-xr-x 1 root root 24852 27. Jun 09:34 /usr/bin/[
22 -rwxr-xr-x 1 root root 22784 27. Jun 09:34 /usr/bin/test
23
24 I wonder where the differences are. I would've expected that test and [
25 were hardlinks.
26
27 Alexander Skwar
28 --
29 Is it 1974? What's for SUPPER? Can I spend my COLLEGE FUND in one
30 wild afternoon??
31 --
32 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] strange [ file Hagen Soengen <hagen_soengen@×××.de>
Re: [gentoo-user] strange [ file Dirk Heinrichs <ext-dirk.heinrichs@×××××.com>