delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/10/10/08:27:50

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <470CC586.8040404@byu.net>
Date: Wed, 10 Oct 2007 06:28:54 -0600
From: Eric Blake <ebb9 AT byu DOT net>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Francky AT Leyn DOT eu, cygwin AT cygwin DOT com
Subject: Re: managed mounts
References: <470923CC DOT 3090509 AT Leyn DOT eu>
In-Reply-To: <470923CC.3090509@Leyn.eu>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

http://cygwin.com/acronyms/#PPIOSPE - 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
Documents/accounts/"

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             ebb9 AT byu DOT net
volunteer cygwin coreutils maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHDMWG84KuGfSFAYARApNsAKCnyVAlg2dG90+HHs7J1qCFfqfpygCfUL/e
BllxsgJrVVhNFQ+yeEtkMWo=
=a7Ft
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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