Re: Bug#785116: util-linux: blkid -s returns too much information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 14, 2015 at 06:50:52AM +0930, Ron wrote:
> Right, in the situation where you *do* want multiple values, caring
> about the order should be less of a problem, since you'd just access
> the variables being set rather than trying to parse or interpret
> them literally.  If for some reason you did care about the order,
> you'd run that multiple times with one value for each invocation.
> 
> Which, right now if you do that, you'll end up with something like:
> 
>  # blkid -s UUID -o export /dev/sda2; blkid -s TYPE -o export /dev/sda2
>  DEVNAME=/dev/sda2
>  UUID=9621a7e3-14a1-4d03-8250-b4fbeb79999b
>  DEVNAME=/dev/sda2
>  TYPE=ext4
> 
> I guess the other case where that might bite you is if you were already
> using DEVNAME as a local variable for something else ...

I'd like to keep blkid as very basic command line interface to
libblkid and as the library test program. For standard use cases 
and scripts it's better to use lsblk(8) command which provides 
more information and better control on output format:

        # lsblk --pairs -o FSTYPE,UUID /dev/sda2
        FSTYPE="ext4" UUID="c5490147-2a6c-4c8a-aa1b-33492034f927"

        # lsblk --pairs -o UUID,FSTYPE /dev/sda2
        UUID="c5490147-2a6c-4c8a-aa1b-33492034f927" FSTYPE="ext4"

and it reads information from udev db or from libblkid.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux