delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/01/00:24:32

X-Spam-Check-By: sourceware.org
Message-ID: <451F42EE.2060100@cygwin.com>
Date: Sun, 01 Oct 2006 00:24:14 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060916 Fedora/1.5.0.7-1.fc4.remi Thunderbird/1.5.0.7 Mnenhy/0.7.4.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: mssing packages for cygwin
References: <BAY22-F7319AE2ECFA7C03B4B4BC8B1E0 AT phx DOT gbl>
In-Reply-To: <BAY22-F7319AE2ECFA7C03B4B4BC8B1E0@phx.gbl>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

Tom Lee wrote:
> 
>> > I read mount and cygpath manual, but still not sure if there is a way
>> > that I can
>> > run
>> > tar cvf test.tar c:/test or
>> > tar cvf test.tar c:\test
>> >
>>
>> Actually, from either a DOS or a bash (or other cygwin) shell, you can 
>> do:
>>
>> tar cvf test.tar /cygdrive/c/test
>>
>> Get used to POSIX paths - cygwin is a Linux emulation for Windows, and
>> POSIX paths will work in more places than DOS paths (not to mention that
>> backslashes are a pain to use on the command line with regards to proper
>> quoting rules between the two different styles of shells, but forward
>> slashes work great in both cases).
> 
> 
> tar cvf test.tar /cygdrive/c/test is nice to work.
> 
> howver, can I mount /cygdrive/c as c:/ and run as
> tar cvf test.tar c:/test ?
> 
> I have tar.exe djgpp and it works this way.


djgpp is for the DOS world.  If that's what you really want, you're better
off using djgpp.  But to your question, there is no need to use mount in the
way you describe.  '/cygdrive/c' is a built-in mount to map 'c:' into POSIX
paths.  If you're hung up on DOS paths, you can try'em but if you have
problems that you don't get using the POSIX paths, then you're better
off using 'cygpath' to convert DOS->POSIX.  For example:

   cygpath -u c:/test

As far as Cygwin (and the vast majority of the underlying Win32 functions
accepting paths), \ and / are synonymous.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

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