In order to write DVD/DVD-RW from shell prompt you need to install a package called dvd+rw-tools.
DVD is another good option for backup, archiving, data exchange etc. You can install dvd+rw-tools with following commands. Also note that this package works under *BSD, HP-UX, Solaris and other UNIX like operating systems.
Debian installation:
# apt-get install ‘dvd+rw-tools’
Fedora Core Linux installation:
# yum install ‘dvd+rw-tools’
RedHat Enterprise Linux installation:
# up2date ‘dvd+rw-tools’
First create the ISO image
# mkisofs -r -o /tmp/data.iso /home/data
Now use the growisofs command to write the ISO onto the DVD:
# growisofs -Z /dev/dvd=/tmp/var-www-disk1.iso
To append more data for same DVD:
# growisofs -M /dev/dvd /tmp/file.1
To format (erase) a DVD:
# dvd+rw-format -force /dev/dvd
OR
# dvd+rw-format -force=full /dev/dvd
The dvd+rw-format command formats dvd disk in the specified dvd drive.
To display information about dvd drive and disk using dvd+rw-mediainfo command:
# dvd+rw-mediainfo /dev/dvd