< Day Day Up > |
There are several ways to burn CDs in Mac OS X. Which method of CD-burning you should use depends largely on what kind of data you are burning to the CD. Let's consider an example in which we'll use a CD-R to backup ~/Documents/tex-docs. The same procedure can be applied to other data. We'll discuss how to accomplish this task with the GUI-based Disk Utility application located in /Applications/Utilities, with a burnable folder, and by using the command line in Terminal. In either case, you should make a disk image before burning your data to a CD-R. To make a disk image of ~/Documents/tex-docs using Disk Utility, select File Figure 8-1. Creating a disk image with the Disk Utility![]() When the disk image has been created, it will appear in the list on the left side of the Disk Utility window. To burn this image to a CD-R, select the disk image in Disk Utility's window and click the Burn icon in the toolbar. Disk Utility then prompts you to insert a blank disc and to select some options for burning the CD, as shown in Figure 8-2. You can also do this using burnable folders , a feature introduced in Mac OS X Tiger to make it easier to copy files to a CD. To create a burnable folder, Control-click (or right-click) in the Finder and select New Burn Folder from the contextual menu. This creates a folder with a radioactive burn icon and named with a .fpbf extension. When you drag and drop a file into the Burn Folder, an alias for the file is placed inside the folder (see Appendix A for details on aliases). For example, if you drag and drop a folder named tex-docs into the burnable folder, an alias named tex-docs is created in the Burn Folder. This, along with a yellow bar containing a Burn button just under the titlebar, can be seen when you open the burnable folder, as shown in Figure 8-3. When you click the burn button (or select File Figure 8-2. Burning a disk image with the Disk Utility![]() Figure 8-3. A burnable folder containing an alias of a folder to be burned to a CD![]() You can create a disk image from the Terminal using hdiutil . For example, you can create an image of ~/Documents/tex-docs with this command: $ hdiutil create -srcdir ~/Documents/tex-docs ~/Desktop/tex-docsBAK.dmg Once this command has completed, enter the following command to burn the disk image to disc (you'll be prompted to insert a disc): $ hdiutil burn ~/Desktop/tex-docsBAK.dmg Please insert a disc: You can also create a disk image with a fixed size, copy files to it, and burn it: $ hdiutil create -size 200m ~/Desktop/tex-docsBAK.dmg -fs HFS+ \ -volname tex-docs $ open ~/Desktop/tex-docsBAK.dmg $ cp -R ~/Documents/tex-docs/ /Volumes/tex-docs/ $ umount /Volumes/tex-docs/ $ hdiutil burn ~/Desktop/tex-docsBAK.dmg |
< Day Day Up > |