From owner-freebsd-standards@FreeBSD.ORG Sun Mar 22 22:01:47 2009 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DBF41065670 for ; Sun, 22 Mar 2009 22:01:47 +0000 (UTC) (envelope-from mikolas.janota@gmail.com) Received: from mail-fx0-f167.google.com (mail-fx0-f167.google.com [209.85.220.167]) by mx1.freebsd.org (Postfix) with ESMTP id DE4508FC0A for ; Sun, 22 Mar 2009 22:01:46 +0000 (UTC) (envelope-from mikolas.janota@gmail.com) Received: by fxm11 with SMTP id 11so1465811fxm.43 for ; Sun, 22 Mar 2009 15:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=XrAR6HeSnudVzN9lHE+xl0qT8CaUfO/XLX/MHx3w2/w=; b=iUBLbK+FGmncZFDCWWAsSVMnNCnkgoWGdFJB0jfSAerd59pH5pb2RiT2YGndVMTsF8 gS1IVgCWCVNZuvWGpGuwJFmkl4X1vTSFj+jvnDlD/QmJ7gmSknGDMUcddCDCiY/4Ror/ 2CfxHhySWNicxxyqQyVkmHf81Ho+Hg46rrhL8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=jkn7g1Gfp1ohmvIGiSXsYLgMrG5K84gvl+HSMGAPSSsUJ+L8ciNHpVZeMzdd8zDrkU S4dHIglW6AjUNK4aJbOFs/lMo5HV21ayZv/36it+RoVKbUuRbBq42FPUtb0D4cxW8rPR /o9vabb/CZiG+DS2LCxMdnHwGOmf4YuAvufe8= MIME-Version: 1.0 Received: by 10.223.108.211 with SMTP id g19mr5444681fap.39.1237759306046; Sun, 22 Mar 2009 15:01:46 -0700 (PDT) In-Reply-To: <20090322163200.GA74989@zim.MIT.EDU> References: <682003a60903220754g6c653582lb346f8e8d6bf63cf@mail.gmail.com> <20090322163200.GA74989@zim.MIT.EDU> Date: Sun, 22 Mar 2009 22:01:46 +0000 Message-ID: <682003a60903221501i31d93f58r845c9e3f18ab9695@mail.gmail.com> From: =?UTF-8?B?TWlrb2zDocWhIEphbm90YQ==?= To: =?UTF-8?B?TWlrb2zDocWhIEphbm90YQ==?= , freebsd-standards@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: POSIX conformance of ls -l -1 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2009 22:01:47 -0000 On Sun, Mar 22, 2009 at 4:32 PM, David Schultz wrote: > On Sun, Mar 22, 2009, Mikol=C3=A1=C5=A1 Janota wrote: >> For the command ls, the POSIX standard, says that "When -l (ell) is >> specified, -1 (one) shall be assumed." >> (http://www.opengroup.org/onlinepubs/000095399/utilities/ls.html) >> >> In the FreeBSD implementation, however, -1 and -l override one >> another. I can't see how this could be POSIX compliant. >> >> I'm on Mac OS X which I believe is using FreeBSD port and the man page >> claims POSIX compliance. Where can I find more information about this? > > Perhaps it's a bug. Comments in the source seem to indicate that > it was done this way on purpose, though. If you have `ls' aliased > to `ls -laG', for example, you can still use `ls -1' on the command > line to force the single-line output (as if the options were `ls -aG'.) > I'm not sure what we ought to do about it. > I think the problem is that -1 is interpreted sometimes as "single-column" and sometimes as "one-per-line". The gnu implementation of ls follows the POSIX standard and ls -l -1 is the same as ls -l, but if you write --format=3Dlong --format=3Dsingle-column, long is overriden. Even though --format=3Dsingle-column and -1 should be the same. --=20 Mikol=C3=A1=C5=A1