This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Charles Russell sent the following at Monday, March 14, 2011 10:03 AMThanks. I didn't realize that the output of dir depended on whether it was invoked from cygwin or from cmd, and I didn't know about label.exe.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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |