delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/04/22:48:27

X-Spam-Check-By: sourceware.org
Message-ID: <4524727E.1070709@byu.net>
Date: Wed, 04 Oct 2006 20:48:30 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, tom_lee01 AT hotmail DOT com
Subject: Re: cygwin unix commands in windows
References: <BAY120-F373EEC2F5FB1C8E2FAA4C38B1D0 AT phx DOT gbl>
In-Reply-To: <BAY120-F373EEC2F5FB1C8E2FAA4C38B1D0@phx.gbl>
X-IsSubscribed: yes
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

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

According to Tom Lee on 10/4/2006 5:45 PM:
> Hello,
> 
> after further study, I noticed that using "c:/directory" works fine with
> my tests except tar.exe.
> 
> 
> I understand people here may like /cygdrive/c more than c:/.  Just want
> to know if it is an accident feature that all other commands can work
> with c:/ except tar?

You asked, so I'll answer.  Yes, it is an accident that other tools
understand c:/.  Cygwin operates on the philosophy that you should use
POSIX paths, aka /cygdrive/c (or if that is too much typing for you, read
'man mount' for how you can shorten it to /c, by remounting cygdrive as
'/').  DOS paths work only when the application is not assigning some
other meaning to the literal colon.  ls does not parse its arguments but
hands them straight to stat(), and so it happens to work.  tar, on the
other hand, parses its arguments, and treats "c:/dir" as meaning
"directory /dir" on "remote machine c", unless you use tar --force-local.
 Another example of a program that parses its arguments is make; you need
only read last months archives for the debate about make 3.80 vs. make
3.81 for proof that using DOS paths in cygwin programs is ASKING for
problems.  And yet another case is bash: bash-3.1-8 always opened DOS
paths in binary mode, even though using POSIX paths would open some files
in text mode.  Either learn to use POSIX paths if you use cygwin, or quit
griping.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFJHJ+84KuGfSFAYARAuebAJwPnL9zkIMrnU+tQCSLSiPMGhg3uQCePoOP
MzseCGa1KuXTP5kZKLHfdcY=
=zWJ1
-----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