X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org From: "Nellis, Kenneth" To: "cygwin AT cygwin DOT com" Subject: RE: associating volume labels with drive letters Date: Fri, 19 Oct 2012 18:45:10 +0000 Message-ID: <0D835E9B9CD07F40A48423F80D3B5A7002E69D@USA7109MB022.na.xerox.net> References: <0D835E9B9CD07F40A48423F80D3B5A70022CCD AT USA7109MB022 DOT na DOT xerox DOT net> In-Reply-To: <0D835E9B9CD07F40A48423F80D3B5A70022CCD@USA7109MB022.na.xerox.net> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q9JIjR4X009396 -----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}' G $ --Ken Nellis -- 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