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=jGy0lD51fhHgUlMp KyLWqLDSnG9eg4yD52y/ENp2y3NA5/1rDYIyZwbu3jzucR0AqnEnlpNwJnU13nD8 d0E2PmIqMv9MbtJGOScxFOmHt+m2zZQy2q97zHSrz2zt/LaezP8L4fN74odvmRZh +pyhAOs9Ika6R5FKWoYY/I2r0tw= 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=S0TQtujJrIW0qD+9IejCle +uVV8=; b=oI0zkNSepiA2hgcfr8+fzC1KXUv3h3aqkJdi85zeTKid5RL1Dus1RU HmXVb/VuYSpcd2PEJsYHviOvk8ELCVKsSsh+TaC/LJWe9U3ZK3diN2jTW+Secko/ eYN0bU+CPbNXtt321kpShz6q243Nj1R9f9A0ndek0WyimtvO69AEQ= 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=-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 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: Norton Allen Message-ID: <8258eab7-3490-da21-8867-69ec58b09f5d@huarp.harvard.edu> Date: Wed, 31 Oct 2018 20:02:52 -0400 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 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