managed mounts

Eric Blake
Wed Oct 10 12:27:00 GMT 2007

Hash: SHA1 - redirected to the list

According to Francky Leyn on 10/7/2007 12:22 PM:
> Dear Eric,
> on Mon, 25 Jun 2007, you wrote the following:
>> In short, if you want to expand a tarball that contains a file such as
>> aux.c, or that has both foo and FOO, or any other problematic
> combination,
>> the easiest solution is to:
>>mkdir managed
>>mount -o managed "`cygpath -am managed`" managed
> == mount -o managed "c:/.../managed" managed
> == mount [option] [<win32path> <posixpath>]
>>cd managed
>>tar xvf problematic.tar
> Some questions:
> 1) the tarball is loced at ./managed?
>    How did it come there? You had to issue a mkdir command,
>    and there was no following cp command.

Well, I was only sketching out an idea, and assuming you could fill in the
details.  Yes, you need to either mv the tarball, use a full path to it,
or use the tar -C option, or something similar...

> 2) why do you issue "cygpath -am"? That will generate
>    c:/.../managed . However mount expects as first argument <win32path>.
>    I think this is c:\..\managed . Am I wrong?

mount understands both styles of slashes (since Windows understands both
styles of slashes).  And / is much easier to script with than \.  So I
prefer cygpath -m wherever possible.

> -----
> What I want to do is the following:
> I want to copy the directory
> /cygdrive/d/ef2EF with all its subdirectories and files to
> /cygdrive/c/Documents and Settings/Francky Leyn/My Documents/accounts/ef2EF
> How do I do that?

As long as both directories are either managed or not managed:
mv /cygdrive/d/ef2EF "/cygdrive/c/Documents and Settings/Francky Leyn/My

Otherwise, when crossing managed boundaries, you currently have to do:
cp -pR dirA dirB && rm -Rf dirA

[I still wish that attempting a rename(2) on directories between managed
and non-managed mounts would result in EXDEV, so that mv would fall back
to the hierarchical copy and recreate the correct filenames, rather than
blindly moving the directory and botching all the files contained therein.]

- --
Don't work too hard, make some time for fun as well!

Eric Blake   
volunteer cygwin coreutils maintainer
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list