From unknown Sat Aug 16 21:58:59 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12675 <12675@debbugs.gnu.org> To: bug#12675 <12675@debbugs.gnu.org> Subject: Status: find RFE test verb "-inodes" Reply-To: bug#12675 <12675@debbugs.gnu.org> Date: Sun, 17 Aug 2025 04:58:59 +0000 retitle 12675 find RFE test verb "-inodes" reassign 12675 coreutils submitter 12675 Linda Walsh severity 12675 normal tag 12675 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 18 12:42:59 2012 Received: (at submit) by debbugs.gnu.org; 18 Oct 2012 16:42:59 +0000 Received: from localhost ([127.0.0.1]:50162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOtBS-0004Js-Vl for submit@debbugs.gnu.org; Thu, 18 Oct 2012 12:42:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33475) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOtBQ-0004Jf-Fx for submit@debbugs.gnu.org; Thu, 18 Oct 2012 12:42:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOt9x-0003nu-Pk for submit@debbugs.gnu.org; Thu, 18 Oct 2012 12:41:26 -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]:50715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOt9x-0003nk-Ls for submit@debbugs.gnu.org; Thu, 18 Oct 2012 12:41:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOt9w-0007KC-D7 for bug-coreutils@gnu.org; Thu, 18 Oct 2012 12:41:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOt9t-0003mY-Ve for bug-coreutils@gnu.org; Thu, 18 Oct 2012 12:41:24 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:52182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOt9t-0003m3-Lq for bug-coreutils@gnu.org; Thu, 18 Oct 2012 12:41:21 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.tlinx.org (8.14.5/8.14.4/SuSE Linux 0.8) with ESMTP id q9IGfHMK032381 for ; Thu, 18 Oct 2012 09:41:19 -0700 Message-ID: <5080312D.4030707@tlinx.org> Date: Thu, 18 Oct 2012 09:41:17 -0700 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: find RFE test verb "-inodes" Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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-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 (----) A useful thing to be a test on the number of non-structural entries in a directory. By non structural, it would work like ls -A, and not include entries that are part of the directory structure like "." and ".." -- with the idea of being able to quickly determine if a directory is empty. Maybe 'inodes' with standard +/- adjectives So "find . -type d -inodes 0" would find all the empty dirs. Unless, of course this is already in there and I've missed it... but didn't see anything that would provide this w/o calling an external func on each dir...which really slows things down... From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 18 13:18:50 2012 Received: (at 12675) by debbugs.gnu.org; 18 Oct 2012 17:18:50 +0000 Received: from localhost ([127.0.0.1]:50196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOtkA-00059b-5I for submit@debbugs.gnu.org; Thu, 18 Oct 2012 13:18:50 -0400 Received: from joseki.proulx.com ([216.17.153.58]:48520) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOtk7-00059U-Vy for 12675@debbugs.gnu.org; Thu, 18 Oct 2012 13:18:49 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 25248211D6; Thu, 18 Oct 2012 11:17:22 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id CA4542DCD1; Thu, 18 Oct 2012 11:17:21 -0600 (MDT) Date: Thu, 18 Oct 2012 11:17:21 -0600 From: Bob Proulx To: Linda Walsh Subject: Re: bug#12675: find RFE test verb "-inodes" Message-ID: <20121018171721.GA8282@hysteria.proulx.com> References: <5080312D.4030707@tlinx.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5080312D.4030707@tlinx.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 12675 Cc: 12675@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: 0.4 (/) Linda Walsh wrote: > A useful thing to be a test on the number of non-structural entries > in a directory. > > By non structural, it would work like ls -A, and not include entries > that are part of the directory structure like "." and ".." -- with > the idea of being able to quickly determine if a directory is empty. > > Maybe 'inodes' with standard +/- adjectives > > So "find . -type d -inodes 0" would find all the empty dirs. > > Unless, of course this is already in there and I've missed it... but > didn't see anything that would provide this w/o calling an external func > on each dir...which really slows things down... Do you mean something like find -empty? -- Test: -empty True if the file is empty and is either a regular file or a directory. This might help determine good candidates for deletion. This test is useful with `-depth' (*note Directories::) and `-delete' (*note Single File::). Example: $ find . -empty Bob From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 18 13:24:33 2012 Received: (at control) by debbugs.gnu.org; 18 Oct 2012 17:24:33 +0000 Received: from localhost ([127.0.0.1]:50205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOtph-0005I8-6w for submit@debbugs.gnu.org; Thu, 18 Oct 2012 13:24:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46155) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOtpe-0005Hv-0o; Thu, 18 Oct 2012 13:24:31 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9IHN496007083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Oct 2012 13:23:04 -0400 Received: from [10.3.113.92] (ovpn-113-92.phx2.redhat.com [10.3.113.92]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9IHN30d003643; Thu, 18 Oct 2012 13:23:03 -0400 Message-ID: <50803AF7.3020903@redhat.com> Date: Thu, 18 Oct 2012 11:23:03 -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: Linda Walsh Subject: Re: bug#12675: find RFE test verb "-inodes" References: <5080312D.4030707@tlinx.org> In-Reply-To: <5080312D.4030707@tlinx.org> 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="------------enig5FF6F4979C27CEAC0A59A6C6" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: control Cc: 12675-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) --------------enig5FF6F4979C27CEAC0A59A6C6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tag 12675 notabug thanks On 10/18/2012 10:41 AM, Linda Walsh wrote: > A useful thing to be a test on the number of non-structural entries in = a > directory. >=20 > By non structural, it would work like ls -A, and not include entries > that are > part of the directory structure like "." and ".." -- with the idea of b= eing > able to quickly determine if a directory is empty. So which do you really want - to know how many directory entries exist, or to just know if a directory is (non-)empty? The former would be a new feature, while the latter already exists as a GNU find extension. >=20 > Maybe 'inodes' with standard +/- adjectives >=20 > So "find . -type d -inodes 0" would find all the empty dirs. >=20 > Unless, of course this is already in there and I've missed it... but > didn't see anything that would provide this w/o calling an external fun= c > on each dir...which really slows things down... Sorry, but you've reached the wrong list. GNU coreutils does not maintain find(1); for that, you'd need to write to the findutils list. But while you are correct that POSIX does not provide this capability, GNU find already does what you want: find -type d -empty --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig5FF6F4979C27CEAC0A59A6C6 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/ iQEcBAEBCAAGBQJQgDr3AAoJEKeha0olJ0NqF2QH/0Mi80NdrEMzlyqITugBvD22 v79UtfXrguXVBwAF8Xi1zwizau4nQ4JavVshOT/x8TBfNkYzAZD9EJUumvCJspek UIH14AelKZKju5GAz4938apc7Og4qxHuVO1CyibnypcPXVFEOy782hT/ANhfHTO8 xb53XI4uLz7eG2nS0WKj2LHC4tmAaxb07IZG6moKNnUsVik5DRZheJyH2Jcx7SQH en1F4kP3Aw/D3MEEfx8m5JTmkgfRH/YjnyCllVvw0eau4s//rrl78RF8aUrN/8/Z JuNg+XdkH90RRIYVVtDDQ9UCD3owsDrRSOsqQjYBVnPlIVx6rdCCog/LmDapHRM= =9iKV -----END PGP SIGNATURE----- --------------enig5FF6F4979C27CEAC0A59A6C6-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 18 13:56:54 2012 Received: (at 12675) by debbugs.gnu.org; 18 Oct 2012 17:56:54 +0000 Received: from localhost ([127.0.0.1]:50217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOuKz-0006ri-W3 for submit@debbugs.gnu.org; Thu, 18 Oct 2012 13:56:54 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:59850) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TOuKx-0006ra-Hg for 12675@debbugs.gnu.org; Thu, 18 Oct 2012 13:56:52 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.tlinx.org (8.14.5/8.14.4/SuSE Linux 0.8) with ESMTP id q9IHtMth005047 for <12675@debbugs.gnu.org>; Thu, 18 Oct 2012 10:55:25 -0700 Message-ID: <5080428A.4060909@tlinx.org> Date: Thu, 18 Oct 2012 10:55:22 -0700 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: 12675@debbugs.gnu.org Subject: Re: bug#12675: closed (Re: bug#12675: find RFE test verb "-inodes") References: <50803AF7.3020903@redhat.com> <5080312D.4030707@tlinx.org> In-Reply-To: Content-Type: multipart/alternative; boundary="------------000908080201050004040805" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 12675 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 (/) This is a multi-part message in MIME format. --------------000908080201050004040805 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > > Subject: > Re: bug#12675: find RFE test verb "-inodes" > From: > Eric Blake > Date: > Thu, 18 Oct 2012 11:23:03 -0600 > To: > Linda Walsh > > To: > Linda Walsh > CC: > 12675-done@debbugs.gnu.org > > > tag 12675 notabug > thanks > > >> on each dir...which really slows things down... >> > Sorry, but you've reached the wrong list. GNU coreutils does not > maintain find(1); for that, you'd need to write to the findutils list. > But while you are correct that POSIX does not provide this capability, > GNU find already does what you want: > > find -type d -empty > > Re: list: oops! Forgot! Re: -empty: That'll work for my current need, Thanks! --------------000908080201050004040805 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Ishtar.tlinx.org id q9IHtMth005047

Subje= ct:
Re: bug#12675: find RFE test verb "-inodes"
From:=
Eric Blake <eblake@redhat.com>
Date:=
Thu, 18 Oct 2012 11:23:03 -0600
To: <= /div> Linda Walsh <coreutils@tlinx.org>
To: <= /div> Linda Walsh <coreutils@tlinx.org>

tag 12675 notabug
thanks

  
on each dir...which really slows things down...
    
Sorry, but you've reached the wrong list.  GNU co=
reutils does not
maintain find(1); for that, you'd need to write to the findutils list.
But while you are correct that POSIX does not provide this capability,
GNU find already does what you want:

find -type d -empty

  
Re: list: oops!=C2=A0=C2=A0 Forgot!
Re: -empty: That'll work for my current need,

Thanks!
--------------000908080201050004040805-- From unknown Sat Aug 16 21:58:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 16 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