From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id C90893858400 for ; Wed, 10 Nov 2021 16:35:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C90893858400 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=systematicsw.ab.ca Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id kqHxmVk8wczbLkqZVm9KhR; Wed, 10 Nov 2021 16:35:37 +0000 Received: from [192.168.1.105] ([68.147.0.90]) by cmsmtp with ESMTP id kqZVmtBsd49dpkqZVmXfyb; Wed, 10 Nov 2021 16:35:37 +0000 X-Authority-Analysis: v=2.4 cv=RqTWkQqK c=1 sm=1 tr=0 ts=618bf4d9 a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17 a=IkcTkHD0fZMA:10 a=Q6Ojrw04AAAA:8 a=w0eSA2pEAAAA:8 a=uYT-Tk0qkVT609LjNaIA:9 a=QEXdDO2ut3YA:10 a=7fbTDP6XUc8A:10 a=zT1fvXp2PWv7vJw9GM6h:22 Message-ID: <67833988-507b-2882-d035-83724bfd2ee6@SystematicSw.ab.ca> Date: Wed, 10 Nov 2021 09:35:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Reply-To: cygwin@cygwin.com Subject: Re: Could rm remove files and folders with colon in their name? Content-Language: en-CA To: cygwin@cygwin.com References: From: Brian Inglis Organization: Systematic Software In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfBmNmUOn5vd8nxo0wDoq/EL8p9rde0nJrFVJPUOH/yBLrB3WQCsSmt39tOPmOQZsbvwD8SufNZz3COCQZH/A4sy8mRBcu9Qae8heLi/hsT2x7x8TYtfs 2Va1I1wC/q7EMT2ts/D6TicTWWVkBWXiG7urFFGxS0VlZVa3LIOZYgh9QfTBNhNPuOfZWCZoUyFQ9MBMJXG5eNWE0qsH7OwvWlk= X-Spam-Status: No, score=-1161.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2021 16:35:42 -0000 On 2021-11-10 02:45, Mario Emmenlauer wrote: > > Dear All, > > I've searched if this topic has come up before but could not find it. > > Could 'rm' support removing files and folders that have a colon ':' in > their name? I.e. I would like that 'rm -fr' would remove a full directory > tree, including such folders. Currently it will correctly remove anything > inside such folders, but not the folder itself. > > As an example, for the following structure: >     C:/root/folder/C:/inside/file.txt > > When using 'rm -fr root', afterwards I have: >     C:/root/folder/C: > > To remove everything, I can use 'find root -depth -exec rmdir \{\} \;' > > I understand that files and folders with colon in their name are illegal > on Windows and not supported very well. But a number of tools manage to > create (and also remove) such files. I've found that even the native > 'del' can support this when using the UNC name (see for example > https://serverfault.com/a/96833). It would be great if Cygwin could > also feature this support. > PS: These folders are created when I use the Cygwin-based build system > for ICU (see > https://unicode-org.github.io/icu/userguide/icu4c/build.html#how-to-build-and-install-on-windows-with-cygwin) > > For me this is in a combination with native Perl for Windows (ActivePerl, > in my case), and using absolute build paths. After using ICU's build > system, I can not remove the build tree anymore. It may be possible to > solve this on the ICU side too. But their automake-and-Perl-based path > mangling is not easily modified, and I've failed to isolate the root > cause of the illegal paths. Install the Cygwin cygport and libicu-devel source and binary packages and use only Cygwin exclusively with cygport to avoid problems. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.]