I'm following a recipe I created a couple of years ago, where at one point I need to use blkid to obtain a filesystem UUID.I have this command noted, along with an expected example return value:blkid -o export -s UUID /dev/mapper/thathost_crypt_md3UUID=JNbF5T-vhSD-3aVv-intG-1Tk2-IEOZ-ABWXYZHowever, times have moved on and I'm no longer using Debian wheezy but instead jessie. I see that on this more recent version of Debian I now have a different return value for the same command:blkid -o export -s UUID /dev/mapper/thishost_crypt_sdbDEVNAME=/dev/mapper/thishost_crypt_sdbUUID=bddac63e-3510-4d24-a6fb-4d0a89abcdefThe man page for blkid seems to say that -s UUID should include only values matching that key, yet there's this extraneous DEVNAME in there, too.I have a work-around, in that I can write this in both cases, but it seems strange the output structure should have changed:echo UUID=$(blkid -o value -s UUID /path/to/device)UUID=bddac63e-3510-4d24-a6fb-4d0a89abcdefPackage util-linux versions are 2.20.1-5.3 and 2.25.2-6, respectively.QuestionsWhy the change in UUID shape, and does it matter?Why the change in the output format?
blkid returns more information than expected
linux;uuid;libblkid
DEVNAME is the alias of the device see Persistent device name using aliasFurthermore, it seems UUID is now required to be lowercase by International standards.From Type of Character generated by UUIDTo clarify, a UUID is actually a 128-bit value, not text or digits.  You could think of them as 128-bit unsigned integers.The latest international spec dated 2008-08 states (emphasis mine):6.5.4 Software generating the hexadecimal representation of a UUID shall not use upper case letters. NOTE  It is recommended that the    hexadecimal representation used in all human-readable formats be    restricted to lower-case letters. Software processing this    representation is, however, required to accept both upper and lower    case letters as specified in 6.5.2.As for printing the UUID and the alias/DEVNAMEFrom util-linux/blkid.c is evident that DEVNAME is printed because you are using the -o export} else if (ctl->output & OUTPUT_EXPORT_LIST) {        if (num == 1 && devname)            printf(DEVNAME=%s\n, devname); So I suspected that without -o export it would only print the UUID, and indeed:$blkid -s UUID /dev/sda2/dev/sda2: UUID=67169dd7-f319-4402-a9b2-cebcf2f3657a$ blkid -o export -s UUID /dev/sda2DEVNAME=/dev/sda2UUID=67169dd7-f319-4402-a9b2-cebcf2f3657a