From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 17 14:09:22 2012 Received: (at submit) by debbugs.gnu.org; 17 Oct 2012 18:09:22 +0000 Received: from localhost ([127.0.0.1]:48780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOY3V-0001hT-Ka for submit@debbugs.gnu.org; Wed, 17 Oct 2012 14:09:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51890) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOXyb-0001aP-5B for submit@debbugs.gnu.org; Wed, 17 Oct 2012 14:04:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOXx5-0008WH-9Z for submit@debbugs.gnu.org; Wed, 17 Oct 2012 14:02:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:32883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOXx5-0008WD-5y for submit@debbugs.gnu.org; Wed, 17 Oct 2012 14:02:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOXwy-0003Ii-Tk for bug-coreutils@gnu.org; Wed, 17 Oct 2012 14:02:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOXwx-0008TO-Ps for bug-coreutils@gnu.org; Wed, 17 Oct 2012 14:02:36 -0400 Received: from mail-in-03.arcor-online.net ([151.189.21.43]:42503) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOXwx-0008Sd-Iy for bug-coreutils@gnu.org; Wed, 17 Oct 2012 14:02:35 -0400 Received: from mail-in-19-z2.arcor-online.net (mail-in-19-z2.arcor-online.net [151.189.8.36]) by mx.arcor.de (Postfix) with ESMTP id E4D68D86FA; Wed, 17 Oct 2012 20:02:31 +0200 (CEST) Received: from mail-in-06.arcor-online.net (mail-in-06.arcor-online.net [151.189.21.46]) by mail-in-19-z2.arcor-online.net (Postfix) with ESMTP id E14C53F83D8; Wed, 17 Oct 2012 20:02:31 +0200 (CEST) Received: from IgnazServer (p54AB6E08.dip.t-dialin.net [84.171.110.8]) (Authenticated sender: vamp898@arcor.de) by mail-in-06.arcor-online.net (Postfix) with ESMTPSA id BDF9010BF47; Wed, 17 Oct 2012 20:02:30 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-06.arcor-online.net BDF9010BF47 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by IgnazServer (IgnazServer) with ESMTP id 4F07744004C; Wed, 17 Oct 2012 20:02:35 +0200 (CEST) Received: from IgnazServer (localhost.localdomain [127.0.0.1]) by localhost.localdomain (AvMailGate-3.2.1.26) id 19951-0evkoH; Wed, 17 Oct 2012 18:02:35 -0000 Received: from vamppc.localnet (unknown [37.247.88.178]) by IgnazServer (IgnazServer) with ESMTPSA id 73E5C44004C; Wed, 17 Oct 2012 20:02:33 +0200 (CEST) From: Vamp898 To: bug-coreutils@gnu.org Subject: Not possible to list directories recursiv (-d switch ignores -R) Date: Wed, 17 Oct 2012 20:01:14 +0200 Message-ID: <3815807.Kvv2frAyfV@vamppc> User-Agent: KMail/4.9.2 (Linux/3.5.6-1-ARCH; KDE/4.9.2; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-AntiVirus-Spam-Check: clean (checked by Avira MailGate: version: 3.2.1.26; spam filter version: 3.2.0/2.3; host: IgnazServer) X-AntiVirus: checked by Avira MailGate (version: 3.2.1.26; AVE: 8.2.10.184; VDF: 7.11.46.136; host: IgnazServer); id=19951-0evkoH X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 17 Oct 2012 14:09:21 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Documentation says the following: -d, --directory :: list directory entries instead of contents, and do not dereference symbolic links and -R, --recursive :: list subdirectories recursively And this is what i get when i use ls -dR / $ ls -dR / / I even tried ls -d --recursiv -R -R -R -RRRRRRRRRRR / / The -R switch stand-alone works fine Im using the coreutils 8.19 package from Archlinux From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 17 15:45:40 2012 Received: (at control) by debbugs.gnu.org; 17 Oct 2012 19:45:40 +0000 Received: from localhost ([127.0.0.1]:48853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOZYh-0004mk-N8 for submit@debbugs.gnu.org; Wed, 17 Oct 2012 15:45:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33443) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOZYd-0004mS-EE; Wed, 17 Oct 2012 15:45:38 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9HJiEPD017504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Oct 2012 15:44:14 -0400 Received: from [10.3.113.82] (ovpn-113-82.phx2.redhat.com [10.3.113.82]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9HJiDh3002094; Wed, 17 Oct 2012 15:44:13 -0400 Message-ID: <507F0A8C.7060406@redhat.com> Date: Wed, 17 Oct 2012 13:44:12 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 MIME-Version: 1.0 To: Vamp898 Subject: Re: bug#12664: Not possible to list directories recursiv (-d switch ignores -R) References: <3815807.Kvv2frAyfV@vamppc> In-Reply-To: <3815807.Kvv2frAyfV@vamppc> X-Enigmail-Version: 1.4.5 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig80C3D52426B667721AA29699" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: control Cc: 12664-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig80C3D52426B667721AA29699 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable tag 12664 notabug thanks On 10/17/2012 12:01 PM, Vamp898 wrote: > Documentation says the following: >=20 > -d, --directory :: list directory entries instead of contents, and do n= ot=20 > dereference symbolic links >=20 > and >=20 > -R, --recursive :: list subdirectories recursively >=20 > And this is what i get when i use ls -dR / >=20 > $ ls -dR / > / Thanks for the report. However, POSIX require -d to treat directories as files rather than directories, and says that mixing -d and -R is unspecified: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html > -d > Do not follow symbolic links named as operands unless the -H or -L = options are specified. Do not treat directories differently than other ty= pes of files. The use of -d with -R produces unspecified results. In GNU, we take this to mean that -d always overrides -R, because recursion makes sense only if you treat a directory as a directory, but -d says to treat it as a file instead. If you need to mix recursion with listing of directories, consider using find(1), as in: find . -type d or with specific ls options: find . -type d -exec ls -ld {} + As such, I'm closing this as not a bug; but you are free to still add comments or questions to this conversation. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig80C3D52426B667721AA29699 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQfwqNAAoJEKeha0olJ0NqIfQH/2WGKQSc/7nOqvWybixpvNjl VYLiG1zJL5jQk20Zoh+pYy9idT4ij9A9acevdBW/Ttz3tDGJGQf5YnGJkurcJpLJ 8j4uLi5ApYD28Z1cvGMn27V2MrcuOXlTe2nQrxzw/jcaag2VYJyKrviVWURKmI6n Eyc/puqpe0AMoWs24ur0iQSLgJDhQbdR0HSHr7GTx0HxYSsKH/TYEdWf4sMF+l+w Nf8JwxW9+mvtjOWzEF48q2U1IJz7IWNGGHJ89eKjpi4yRXZYpmS0Ao59fvsujsZZ zFasXm2NFGVEF+jpk4zx1nGUQ2Bd+DK9cYmzuh6eypi0ezxn2+11wyeXVKUmxOg= =YWVY -----END PGP SIGNATURE----- --------------enig80C3D52426B667721AA29699-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 17 16:42:38 2012 Received: (at 12664) by debbugs.gnu.org; 17 Oct 2012 20:42:38 +0000 Received: from localhost ([127.0.0.1]:48924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOaRp-00070K-N1 for submit@debbugs.gnu.org; Wed, 17 Oct 2012 16:42:38 -0400 Received: from joseki.proulx.com ([216.17.153.58]:41172) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOaRn-00070C-RQ for 12664@debbugs.gnu.org; Wed, 17 Oct 2012 16:42:36 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id D4486211DF; Wed, 17 Oct 2012 14:41:14 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id C528D2DCD1; Wed, 17 Oct 2012 14:41:14 -0600 (MDT) Date: Wed, 17 Oct 2012 14:41:14 -0600 From: Bob Proulx To: 12664@debbugs.gnu.org, Vamp898 Subject: Re: bug#12664: Not possible to list directories recursiv (-d switch ignores -R) Message-ID: <20121017204114.GA18054@hysteria.proulx.com> References: <3815807.Kvv2frAyfV@vamppc> <507F0A8C.7060406@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <507F0A8C.7060406@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 12664 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.4 (/) Vamp898 wrote: > Documentation says the following: > > -d, --directory :: list directory entries instead of contents, and do not > dereference symbolic links > > and > > -R, --recursive :: list subdirectories recursively > > And this is what i get when i use ls -dR / > > $ ls -dR / > / Right. Because the -d said to list the directory and not the contents. In addition to everything Eric said see also this FAQ entry: http://www.gnu.org/software/coreutils/faq/#ls-_002dd-does-not-list-directories_0021 Bob From unknown Sat Jun 21 12:33:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 15 Nov 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator