1.7] Can you have multipe cygdrive path prefixes active at once

Jeremy Bopp jeremy@bopp.net
Fri Nov 6 23:04:00 GMT 2009


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
> following:
>> $ 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
> cygdrive
>> prefix.  Then dirname is used to effectively chop off the drive letter
>> leaving you with the cygdrive prefix.
> 
> Actually:
> 
> $ ls /cygdrive
> c  e  f  h  j  p  t  z
> $ cygpath -u x:/
> /cygdrive/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.

-Jeremy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list