How to image a CD from the command line in Mac OS X

The really short version:

‘df’ will give you a list of mounted volumes, in my case the disc was at /dev/disk2s0
‘sudo diskutil unmountDisk /dev/disk2’ to unmount it from the Finder so it is not in use.
‘hdiutil convert /dev/disk2s0 -format UDTO -o image.cdr’

See this hint on macosxhints for details.