public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Could rm remove files and folders with colon in their name?
Date: Wed, 10 Nov 2021 09:35:36 -0700	[thread overview]
Message-ID: <67833988-507b-2882-d035-83724bfd2ee6@SystematicSw.ab.ca> (raw)
In-Reply-To: <e2bbb443-b876-40fe-ca58-ab0c7d064f7b@emmenlauer.de>

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

  parent reply	other threads:[~2021-11-10 16:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  9:45 Mario Emmenlauer
2021-11-10 13:49 ` Corinna Vinschen
2021-11-10 20:24   ` Mario Emmenlauer
2021-11-10 20:39     ` Corinna Vinschen
2021-11-11 14:00       ` Mario Emmenlauer
2021-11-24 15:40       ` Chris Wagner
2021-11-10 14:49 ` Andrey Repin
2021-11-10 16:35 ` Brian Inglis [this message]
2021-11-10 20:23   ` Mario Emmenlauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67833988-507b-2882-d035-83724bfd2ee6@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).