I want to make a system call from within a Ruby program, to get the volume label for a CD the program just mounted on /media/cdrom. I've tried a number of things, with no success. I don't know what to Google for next! I'm just trying to get something to work from the Kubuntu command line. I can take it from there.
Most likely to work appears to be something like -
vol_id --label \media\cdrom
BUT, that's not right. It responds with "unknown volume type"
I tried this -
ls /media/cdrom0 /dev/disk/by-label
and got -
/dev/disk/by-label:
Local\x20Disk
That's just not helpful. The disk label is actuall "cdr050".
I'm no Linux whiz, and I don't really what to try next. Can anyone tell me how to do this, please?
Most likely to work appears to be something like -
vol_id --label \media\cdrom
BUT, that's not right. It responds with "unknown volume type"
I tried this -
ls /media/cdrom0 /dev/disk/by-label
and got -
/dev/disk/by-label:
Local\x20Disk
That's just not helpful. The disk label is actuall "cdr050".
I'm no Linux whiz, and I don't really what to try next. Can anyone tell me how to do this, please?
Comment