delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Date: | Sun, 20 May 2007 12:34:23 -0400 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: How to uniformly point to the root of a drive? |
Message-ID: | <20070520163423.GA9211@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <f2por8$as9$1 AT sea DOT gmane DOT org> <46506BA1 DOT C3502CCD AT dessent DOT net> |
MIME-Version: | 1.0 |
In-Reply-To: | <46506BA1.C3502CCD@dessent.net> |
User-Agent: | Mutt/1.5.14 (2007-02-12) |
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 Sun, May 20, 2007 at 08:39:13AM -0700, Brian Dessent wrote: >Thorsten Kampe wrote: >>is there a way to consistently point (in a script for instance) to the >>root of a removable drive (flash drive)? >> >>The root could be /cygdrive/g on one computer and on the other >>/cygdrive/f (I have no control of the drive letters). One solution >>would be to install Cygwin to \ (instead of the standard \cygwin) but >>for clarity's sake I would like to keep the Cygwin stuff in a directory >>of its own. > >I assume you mean the root directory of the drive on which Cygwin is >installed, i.e. the drive containing /: > >echo "root dir of / is $(cygpath "$(cygpath -m / | cut -b1-3)")" > >This will fail for UNC paths and so on, but you can check for that I >suppose. You can use any arbitrary path in place of /, but be sure to >quote as necessary. I wouldn't expect cygwin to be "installed" (as in a mount table existing) when running from a removable drive, though. In any event, if neither of the two described methods work then we'll probably need more clarification on what is being attempted here. cgf -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |