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: Accessing folders elsewhere than C:\cygwin

On Feb  9 15:37, Greg Chicares wrote:
> On 2011-02-09 14:42Z, Fergus wrote:
> > I have Cygwin mounted conventionally under Q:\cygwin.
> > I would like to access files under Q:\else.
> > But (for example) ls ../../.. only ever attains \cygwin (and lower).
> > I can use ls /cygdrive/q/else/ (and lower) but this means knowing the 
> > drive name (in this case Q:)
> > I don't much want to change mount points which are currently 
> > conventionally defined.
> > Is there a way I can get to Q:\else without knowing the drive name Q:?
> ls `cygpath -m /`/../else

This might result in a DOS path warning, but you can create a variable
containing the parent dir of the Cygwin root as POSIX path without
triggering the DOS path warning:

  cygwin_parent=$(cygpath -ua $(cygpath -ma /)/..)


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

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