X-Spam-Check-By: sourceware.org Message-ID: <4524727E.1070709@byu.net> Date: Wed, 04 Oct 2006 20:48:30 -0600 From: Eric Blake 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: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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/