delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/02/09/11:39:25

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 9 Feb 2011 17:38:58 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Accessing folders elsewhere than C:\cygwin
Message-ID: <20110209163858.GJ16194@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4D52A7DD DOT 7080208 AT bonhard DOT uklinux DOT net> <4D52B4D3 DOT 2040102 AT sbcglobal DOT net>
MIME-Version: 1.0
In-Reply-To: <4D52B4D3.2040102@sbcglobal.net>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019