From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26687 invoked by alias); 19 Oct 2012 18:52:05 -0000 Received: (qmail 26669 invoked by uid 22791); 19 Oct 2012 18:51:54 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Fri, 19 Oct 2012 18:51:47 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 7FCFA2C00D6; Fri, 19 Oct 2012 20:51:44 +0200 (CEST) Date: Fri, 19 Oct 2012 18:52:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: associating volume labels with drive letters Message-ID: <20121019185144.GB25877@calimero.vinschen.de> Mail-Followup-To: cygwin@cygwin.com References: <0D835E9B9CD07F40A48423F80D3B5A70022CCD@USA7109MB022.na.xerox.net> <0D835E9B9CD07F40A48423F80D3B5A7002E69D@USA7109MB022.na.xerox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0D835E9B9CD07F40A48423F80D3B5A7002E69D@USA7109MB022.na.xerox.net> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-10/txt/msg00274.txt.bz2 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. > > > 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