This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to uniformly point to the root of a drive?


On 5/20/07, Karl M wrote:
Hi All...

>From: Christopher Faylor Subject: Re: How to uniformly point to the root of
>a drive?
>Date: Sun, 20 May 2007 13:36:16 -0400
>
>On Sun, May 20, 2007 at 01:27:05PM -0400, Christopher Faylor wrote:
> >So it sounds like Brian's method would work then wouldn't it?
>
>Does this give you what you want, too?
>
>driveroot=$(cygpath $(cygpath -wm /)/..)
>
What is the difference between "cygpath -m ..." and "cygpath -wm ..."

That's easy: they're exactly the same. Now for some tricky ones: 1)what does: "cygpath -lpw '/bin/nonexistant:/usr/bin'" do? 2)what's the difference between "cygpath -m ..." and "cygpath -t mixed ..."? 3)what's the difference between: "cygpath -uuuu -t mixed -t mixed -t unix -t mixed -mmm ..." and "cygpath -m ..."







Answers follow:



Answers
1)
$ cygpath  -lpw '/bin/nonexistant:/usr/bin'
÷;C:\cygwin\bin
^ That's a divided-by symbol there. Some lack of error checking
somewhere, I suppose.

2)
$ cygpath -t mixed  .. && cygpath -t mixed  -D
C:/cygwin/home/
/cygdrive/c/Documents and Settings/Lev/Desktop

$ cygpath -m .. && cygpath -m -D
C:/cygwin/home/
C:/Documents and Settings/Lev/Desktop

Ie, they're the same for usual paths, but '-t mixed' gives a unix path
for the "system information" options

3) none

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]