Programming and Scripting :: Partition label function.



Can someone tell me how to get partition name (label) with bash script?

If a function could be submitted..?

I suppose you could try doing something with fdisk?
sudo tune2fs -l /dev/hdXX | grep "Filesystem volume name"

I think this is only for ext2


original here.