From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77125 invoked by alias); 1 Nov 2018 00:02:56 -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 77059 invoked by uid 89); 1 Nov 2018 00:02:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Walsh, H*MI:sk:5BDA347, H*i:sk:5BDA347, H*f:sk:5BDA347 X-HELO: endymion.arp.harvard.edu Received: from endymion.arp.harvard.edu (HELO endymion.arp.harvard.edu) (140.247.179.94) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Nov 2018 00:02:54 +0000 Received: from [192.168.2.4] (pool-74-104-157-88.bstnma.fios.verizon.net [74.104.157.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by endymion.arp.harvard.edu (Postfix) with ESMTPSA id 8D69E6C0044 for ; Wed, 31 Oct 2018 20:02:54 -0400 (EDT) Subject: Re: RFE: find -d -size 0 => doesn't find empty directories To: cygwin@cygwin.com References: <5BDA347D.8070909@tlinx.org> From: Norton Allen Message-ID: <8258eab7-3490-da21-8867-69ec58b09f5d@huarp.harvard.edu> Date: Thu, 01 Nov 2018 00:02:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 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-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg00000.txt.bz2 On 10/31/2018 7:02 PM, 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. What flavor of Linux are you using where this works for you? I'm running Ubuntu 16.04 at the moment, and I just tried the following in an otherwise empty directory: $ mkdir b $ find . -size 0 The directory 'b' did not show up, hence was not reporting as size 0. The man page for -size does not mention any special behavior for directories as opposed to regular files, so I would expect Linux to never report any directory as size 0, since they always have '.' and '..' entries, as you suggested. -- 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