X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 623CD3857823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1636555876; bh=k+Dt6K/fUQ7aIo63O3vzA59YOg5MCXwxMPuIKFE7Vzk=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=QEUcebxcOT9PlFety0rCnO4Q7EgFWQCMw7nAnO0Xb6VWGPdpfBghZcO9AkVcIX1Fv k5cEkeAx0+91FYi1NcfY+X1ydLaGeIK+qMFbsWoWWCSjXJCMjNsc3vnE9pIBGa+e4O R3w9A1B+e5GAw1JIzH2MeUxrCwLChfNHIB/VN3cE= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A26D6385781F X-Yandex-Fwd: 2 Date: Wed, 10 Nov 2021 17:49:20 +0300 X-Mailer: The Bat! (v6.8.8) Home X-Priority: 3 (Normal) Message-ID: <1563129461.20211110174920@yandex.ru> To: Mario Emmenlauer , cygwin AT cygwin DOT com Subject: Re: Could rm remove files and folders with colon in their name? In-Reply-To: References: MIME-Version: 1.0 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 AT cygwin DOT 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: , From: Andrey Repin via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Andrey Repin Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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... -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple