From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12873 invoked by alias); 31 Oct 2018 23:02:27 -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 12864 invoked by uid 89); 31 Oct 2018 23:02:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 spammy=linda, H*F:U*cygwin, layer, Hx-languages-length:800 X-HELO: Ishtar.sc.tlinx.org Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Oct 2018 23:02:25 +0000 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id w9VN2LIE035115 for ; Wed, 31 Oct 2018 16:02:23 -0700 Message-ID: <5BDA347D.8070909@tlinx.org> Date: Wed, 31 Oct 2018 23:02:00 -0000 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: "cygwin@cygwin.com" Subject: RFE: find -d -size 0 => doesn't find empty directories Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00279.txt.bz2 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? Thanks much, -linda -- 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