From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37965 invoked by alias); 1 Nov 2018 01:16:50 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 37954 invoked by uid 89); 1 Nov 2018 01:16:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*F:U*mark, H*UA:6.1, H*u:6.1 X-HELO: m0.truegem.net Received: from m0.truegem.net (HELO m0.truegem.net) (69.55.228.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Nov 2018 01:16:47 +0000 Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id wA11Gkvt084114 for ; Wed, 31 Oct 2018 18:16:46 -0700 (PDT) (envelope-from mark@maxrnd.com) Received: from 162-235-43-67.lightspeed.irvnca.sbcglobal.net(162.235.43.67), claiming to be "[192.168.1.100]" via SMTP by m0.truegem.net, id smtpdQ3ghuo; Wed Oct 31 17:16:37 2018 Subject: Re: RFE: find -d -size 0 => doesn't find empty directories To: cygwin@cygwin.com References: <5BDA347D.8070909@tlinx.org> From: Mark Geisert Message-ID: Date: Thu, 01 Nov 2018 01:16:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: <5BDA347D.8070909@tlinx.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-11/txt/msg00001.txt.bz2 L A Walsh wrote: > Something I can use on my /tmp files on linux is a find command: > > find /tmp -size 0 -delete > > to delete zero-len-files or empty-directories in /tmp. > > Unfortunately, due to directories really not being in the user > disk data space, but in the MFT(zone) (I think), the size > comes back as zero ('0') for directories. > > Would it be possible (if not problematic) for the cygwin > emulation layer to return some non-zero value if the > directory has actual entries in it (ignoring structural > values like "." and "..")? Maybe return as 'size' either > a dummy number proportional to #entries (like 10*#entries), > or something like summing up actual number (+1) of characters > in the file list? > > Would that be difficult to do, or add? Try 'find -d -empty' ..mark -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple