There are three sizes involved:
- The size of the media.
- The size of the filesystem.
- The extent of the data.
In principle, these sizes are in decreasing order (the filesystem should fit on the media, and the data should be within the filesystem boundaries). Furthermore the filesystem on an optical disc is typically adjusted to the data, so copying the filesystem should be just right.
The Linux utility suite comes with the
isosize utility to print the size of an iso9660 filesystem.
head -c $(isosize /dev/dvd) </dev/dvd >~/dvd/abc.iso
(You can use
head is just as good. Despite popular myths,
dd is not more suitable for accessing devices (the magic is in
/dev/dvd, not in
dd), and it typically isn't even faster.)
Some DVDs have a crude copy protection method where the size of the filesystem is wrong, so that if you copy the filesystem, part of the data will be missing. If you have a movie DVD that is a lot smaller than the format would permit, there's a chance you're seeing this. In this case, you do need to copy the whole disk image.