From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1228 invoked by alias); 3 Mar 2015 04:22:37 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19964 Received: (qmail 19614 invoked from network); 3 Mar 2015 04:22:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_FSL_HELO_BARE_IP_2 autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1425356116; bh=eEXDGzXuKKLUXvorQKc3QXLofP72j7R3QFHZ6G0VvIQ=; h=From:To:Cc:In-Reply-To:References:Subject:Date; b=Vqt97BaTiX3Efyh4X3VjtIzJ3s0JUTQ/8uphRUIM7VkpE845zRGWfQ2O7JJtAWsPX cTLrrpNhBZssilI5rVaxnfW/eKhkiFHaRX9x6WbvN+iVOSmnkn+JUf6yvR3Nv0OmOS y64V99nMIoywOtVvkiIjZkcKujWl44byQHIcT9/o= From: ZyX To: Kurtis Rader Cc: Zsh Users , Ray Andrews In-Reply-To: References: <54F33934.2070607@eastlink.ca> <13666281425228233@web7o.yandex.ru> <54F345D3.9010204@eastlink.ca> <20150302022754.GA7449@xvii.vinc17.org> <54F3E489.5050603@eastlink.ca> <54F48D26.6040303@eastlink.ca> <3716401425322991@web19h.yandex.ru> Subject: Re: grammar triviality with '&&' MIME-Version: 1.0 Message-Id: <2721791425356115@web16g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 03 Mar 2015 07:15:15 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r 02.03.2015, 23:18, "Kurtis Rader" : > On Mar 2, 2015 11:03 AM, "ZyX" 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.