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: 1.7] Can you have multipe cygdrive path prefixes active at once

On 11/06/2009 05:35 PM, Jeremy Bopp wrote:
Thrall, Bryan wrote:
Jeremy Bopp wrote on Friday, November 06, 2009 3:31 PM:
Well, it's a bit of a hack, but you could try something like the
$ dirname $(cygpath -u C:/)

This assumes that there is always a C: drive and converts the path to
the root of that drive into a POSIX path which will include the
prefix.  Then dirname is used to effectively chop off the drive letter
leaving you with the cygdrive prefix.


$ ls /cygdrive
c  e  f  h  j  p  t  z
$ cygpath -u x:/

Seems like you aren't assuming the drive exists :)

That's pretty sweet, but that feature seems to be fairly fortuitous rather than by design. Maybe someone could speak on this point with more authority.

If you need to know what the cygdrive prefix is, you're much better off asking 'mount' directly. I know it's a little more parsing but getting it directly rather than trying back doors is far more reliable.

Larry Hall                    
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746


A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

Problem reports:
Unsubscribe info:

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