X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:content-type:content-transfer-encoding; q=dns; s=default; b=tLF
	sID24sS1B4tlrwH9Y8FTBQn/KZk7hKN2/88PKAQZuR4mWYDsYEpybbMkpfpmBC7Z
	fjIzEAt8d7NLhqDEI/VeNWGJKlvwLWtdn6QTgjVxRwuB+2d18r6VlNnj6rmBcA7V
	/XxEGo9upuFmpMvN795k4pf1dID6FfRcB9rJbcXc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:content-type:content-transfer-encoding; s=default; bh=RCclf/luu
	6rKUjbCP1FUtkJLrDk=; b=bGgMQAV7CkAXIsVWUUjtR0MCJiEGYTWlW7BRPUBIr
	GvsWb11awsuEK4CZ5C9Gt4W54DhEmxSvOizuCCuFK7vPfBx4AGfnPbLfaj9oW8nk
	c6AcQDp4I3csUaJS4i7n2PX3Kd4V+CZtT7ioiJ2BWmCij68UzEwKFJ2zPPHGp13W
	hQ=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
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
Message-ID: <5BDA347D.8070909@tlinx.org>
Date: Wed, 31 Oct 2018 16:02:21 -0700
From: L A Walsh <cygwin@tlinx.org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RFE: find <path> -d -size 0 => doesn't find empty directories
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

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

