From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward500p.mail.yandex.net (forward500p.mail.yandex.net [77.88.28.110]) by sourceware.org (Postfix) with ESMTPS id A26D6385781F for ; Wed, 10 Nov 2021 14:50:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A26D6385781F Received: from vla5-778bf653163d.qloud-c.yandex.net (vla5-778bf653163d.qloud-c.yandex.net [IPv6:2a02:6b8:c18:3584:0:640:778b:f653]) by forward500p.mail.yandex.net (Yandex) with ESMTP id 8DF91F023A9; Wed, 10 Nov 2021 17:50:01 +0300 (MSK) Received: from vla1-719694b86d9e.qloud-c.yandex.net (vla1-719694b86d9e.qloud-c.yandex.net [2a02:6b8:c0d:3495:0:640:7196:94b8]) by vla5-778bf653163d.qloud-c.yandex.net (mxback/Yandex) with ESMTP id VB2l03blOF-o1EOVOIQ; Wed, 10 Nov 2021 17:50:01 +0300 Received: by vla1-719694b86d9e.qloud-c.yandex.net (smtp/Yandex) with ESMTPS id 9KQMKTwY2Q-o1wmdg8o; Wed, 10 Nov 2021 17:50:01 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Fwd: 2 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Wed, 10 Nov 2021 14:49:21 -0000 Date: Wed, 10 Nov 2021 17:49:20 +0300 From: Andrey Repin X-Mailer: The Bat! (v6.8.8) Home Reply-To: cygwin@cygwin.com X-Priority: 3 (Normal) Message-ID: <1563129461.20211110174920@yandex.ru> To: Mario Emmenlauer , cygwin@cygwin.com Subject: Re: Could rm remove files and folders with colon in their name? In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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 14:50:06 -0000 Greetings, Mario Emmenlauer! > 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. They are not necessarily illegal, it's just not well supported. > 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. Mixing Cygwin and native tools like that is prone to cause issues. In your case, it may be more than one issue, as build system could misdetect the platform it is building on, and such unusable paths could be the least of your issues. -- With best regards, Andrey Repin Wednesday, November 10, 2021 17:45:57 Sorry for my terrible english...