I can't mount a DVD or CD if it is blank, but I'd like to find out its size before.

With a USB I could easily use fdisk, but that doesn't work with CD or DVD

If possible I'd also like to find out whether it's a DVD or CD. sr0 is the listed block device.


You can do this with udftools

cdrwtool -i -d /dev/sr0 | awk '$1 == "free_blocks" {print $3 * 2048}'

will show the size in bytes.

On an empty DVD I get


and it says 4.7Gb on the disc itself.

If possible i'd also like to find out whether it's dvd or cd.

There are no 4.7Gb cd's. Nor 700Mb dvd's. The size also shows you what kind of medium it is.

There is also

cdrecord -minfo -v

To use it install:

sudo apt install wodim

There is also dvd+rw-mediainfo:

dvd+rw-mediainfo /dev/sr0
  • wodim 9:1.1.11-2ubuntu3 shipped with Ubuntu 14.04 LTS does not like the command cdrecord -minfo -v and returns a message wodim: Bad Option: -minfo – XavierStuvw Jan 20 '18 at 14:06
  • dvd+rw-mediainfo: :-( non-DVD media mounted, exiting... – Gringo Suave Mar 22 at 4:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.