X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org X-IronPortListener: Outbound_SMTP X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEAAC/bfU2cKEcV/2dsb2JhbACYRI1Fd6ZrmTyFYgSQOg From: "Buchbinder, Barry (NIH/NIAID) [E]" To: cygwin cygwin CC: "'Charles Russell'" Date: Mon, 14 Mar 2011 12:11:33 -0400 Subject: RE: How to read thumb drive volume label Message-ID: <0105D5C1E0353146B1B222348B0411A209DAA1008C@NIHMLBX02.nih.gov> References: <4D7E200C DOT 40707 AT bellsouth DOT net> In-Reply-To: <4D7E200C.40707@bellsouth.net> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes 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 Charles Russell sent the following at Monday, March 14, 2011 10:03 AM >Is there some way to read the volume label on a USB flash drive? >Something like blkid in linux? Something like this? function label() { $(cygpath --sysdir)/cmd /c dir ${1}:\\ | \ tr \\r \\n | \ sed -n -e '1s/^ Volume in drive . is //p' } Or you could play with $(cygpath --sysdir)/label.exe Note that both require that one provides the drive letter. I hope this was not OT. I apologize for use of tools that come with Windows, but sometimes I find native tools to be easiest. - Barry Disclaimer: Statements made herein are not made on behalf of NIAID. -- 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