delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/11/10/09:51:17

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 <mario AT emmenlauer DOT de>, cygwin AT cygwin DOT com
Subject: Re: Could rm remove files and folders with colon in their name?
In-Reply-To: <e2bbb443-b876-40fe-ca58-ab0c7d064f7b@emmenlauer.de>
References: <e2bbb443-b876-40fe-ca58-ab0c7d064f7b AT emmenlauer DOT de>
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
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Andrey Repin via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Andrey Repin <anrdaemon AT yandex DOT ru>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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

- Raw text -


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