Duplicate a CD/DVD-ROM via the command line

G

gatorparrots

Guest
If you need to create a personal backup copy of a CD-ROM or DVD, it's fairly simple to do so in the terminal. First, insert the CD-ROM/DVD to be copied into your drive. When the Finder mounts it, take note of the path (especially the title of the disc). (You can also get this information via df if you are working totally without the GUI.)

Next, unmount the disc:
hdiutil unmount "/Volumes/nameofcd"
It should report its progress like so:
Code:
hdiutil: unmount: LetIOKitSettleDown: (timed out).
"disk3s1s9" unmounted successfully.
Next, copy the disc to your hard disk using the CD/DVD Master format (use whatever disk3xxxx name was returned above in the following command):
hdiutil convert /dev/disk3s1s9 -format UDTO -o "~/Desktop/nameofcd"
Its progress will look something like this:
Code:
Preparing imaging engine...
Reading Apple_HFS (0)...
..........................................................................
Terminating imaging engine...
Elapsed Time: 17m 21.578s
 (2 tasks, weight 100)
File size: 678428672 bytes
Sectors processed: 1325056, 1325056 copied
Speed: 636.1Kbytes/sec
created: nameofcd.dmg
Eject the disc from the drive and run this command: hdiutil burn "nameofcd.dmg" -noverifyburn -noeject

It will prompt you for a disc, insert one and it will burn your disc:
Code:
Please insert a disc: 
Starting
Initializing
Saving temporary image
Opening session
Writing track
............................................................................
Finishing writing
............................................................................
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top