delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/10/19/14:52:12

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 19 Oct 2012 20:51:44 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: associating volume labels with drive letters
Message-ID: <20121019185144.GB25877@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <0D835E9B9CD07F40A48423F80D3B5A70022CCD AT USA7109MB022 DOT na DOT xerox DOT net> <0D835E9B9CD07F40A48423F80D3B5A7002E69D AT USA7109MB022 DOT na DOT xerox DOT net>
MIME-Version: 1.0
In-Reply-To: <0D835E9B9CD07F40A48423F80D3B5A7002E69D@USA7109MB022.na.xerox.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 Oct 19 18:45, Nellis, Kenneth wrote:
> -----Original Message-----
> From: Nellis, Kenneth
> From: Mark O'Keefe
> > Hi,
> >
> > Here is a perl script which I believe should do the trick.
> >
> > It adds:  (for example)
> >   DRIVE="C:"
> > to the end of the blkid output where the drive letter matches the correct drive location.
> >
> > Along the same lines I've also played around with a customised version of cygwin that allows the mount
> > command to use UUID's to identify the drive letter instead of hard coding into fstab.  This would be useful
> > if you wanted specific drives to be mounted to specific locations without dependence on the drive letter.
> >
> > I haven't extensively tested this, just quickly put it together to give you the idea.
> <snip>
> 
> Thanx, Mark. Works great!
> --Ken Nellis
> -----END Original Message-----
> 
> The following bash command line provides another way to learn the 
> drive letter associated with a given label, in this case the drive 
> labeled "CRUZER":
> 
> $ echo -e "list volume\nexit" | diskpart | awk '/CRUZER/ {print $3}'

Better make that /bin/echo.  The tcsh echo works slightly different
than bash's version...


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