Mac OSX: Create ISO CD/DVD image (.iso)

So I tried searching around but couldn't find a clear solution on this. I had to retrieve bits by bits and visit some forums which takes time. Anyhow, without further ado, here are the steps in creating an ISO CD/DVD image from OS X using Terminal app so you won't need any additional third party software. The steps are as the following:

Open Terminal.app from Utilities folder under the application, then you will need to see where your dvd/cd is under (usually it is in /dev/disk1) by typing:
drutil status

From there find the word "Name" which represents the accessible directory.

Unmount the disk to ensure that the disk is not locked by the OS so you can create a perfect duplication of the disk by typing:
diskutil unmountDisk /dev/disk1

Then, create the ISO file by typing the following:
dd if=/dev/disk1 of=nameOfDisk.iso bs=2048

Wait while the disk is being duplicated as nameOfDisk.iso is being created. Not that this copies exactly the disk you are duplicating so it can also be bootable.

That it! Good luck!