X-Recipient: archive-cygwin AT delorie DOT 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=HbWAvsT6aD7o7Gmm j9hUQueFU/Nk1R1b/slqld57WWF+xFiI+m+bx87yCZhgUoM2q2xBE3op56UuzLMA 7EMGfQq1bkOTOjungQGmdZUVzQFdJhx/5mQNziX4CKOrnaF34JUOQSsf4hxeUZ8B 1xUlfQmUHiyNhqy0PbwacFP/NzQ= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=asCpbc2Yb8RBwXjrbiH1YU cZmJo=; b=keggkGmTx3CWx5BFmFDaTP84UccInsjLmScuPjPZQwYXdrlTjjB28j gv2af0+STV/DV8zySxKj//oVpncjichETBKPy/aqNZKMlo9uNrSVemix4JZrNPeA O5bA7DEUn/CbSvc28mrbLR5cRkQHkZxzrPs0fB776IdiROIon0XvY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Subject: Re: RFE: find -d -size 0 => doesn't find empty directories To: cygwin AT cygwin DOT com References: <5BDA347D DOT 8070909 AT tlinx DOT org> From: Mark Geisert Message-ID: Date: Wed, 31 Oct 2018 18:16:37 -0700 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 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