But, in case you want a quick and dirty way to erase CDs and DVDs with a terminal command you are in luck.
1. Insert your CD or DVD in the tray.
2. Fire up the terminal and issue the following command:
umount /dev/cdrom
cdrecord dev=/dev/cdrom blank=fast
cdrecord dev=/dev/cdrom blank=fast
Thats it, use your shiny CD/DVD for burning any movies or things.