delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/07/22/10:58:36

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
Message-ID: <BLU0-SMTP87D5BB8FBB7E722ACD442FCEDE0@phx.gbl>
Date: Sun, 22 Jul 2012 16:58:04 +0200
From: Aaron Schneider <notstop AT users DOT sourceforge DOT net>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Confusing, but not fatal bug....rmdir removed network dir (rename to .____00000hexnum/)
References: <500B961D DOT 6050303 AT tlinx DOT org> <333998685 DOT 20120722180817 AT mtu-net DOT ru>
In-Reply-To: <333998685.20120722180817@mtu-net.ru>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 22/07/2012 16:08, Andrey Repin wrote:
> Greetings, Linda Walsh!
>
>> I sometimes use "rmdir *" to clean up empty dir's.
>
> There's a known issue about difference in Windows and *NIX handling of
> directory removal in many cases.
> I would say, you drop such practice and be more explicit in your actions.
>

I don't know what issue is such, but, you can try:

To print or delete empty directories only in present level try:
  find ./ -maxdepth 1 -empty -type d -print
  find ./ -maxdepth 1 -empty -type d -delete

To search or delete recursively folders only remove the maxdepth
  find ./ -empty -type d -print
  find ./ -empty -type d -delete

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019