8.1. Burning CDs

 < 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 New Disk Image From Folder and choose ~/Documents/tex-docs from the Open dialog that appears. A New Image From Folder pop-up window will prompt you to enter the name of the image you want to save, where you want to save the disk image and in what format, and whether you want to encrypt the disk image. This is illustrated in Figure 8-1, where weve chosen to save the disk image as tex-docsBAK to the Desktop in read-only format and without encryption (although you can't see the file extension in that dialog, it's automatically appended, giving you tex-docsBAK.dmg).

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 Burn Disk from the menu bar), you are prompted to insert a blank disc (e.g., a CD-R or DVD-R). When you insert a disc, the actual file (in this example, the tex-docs folder) is written to disc. You can leave the Burn Folder and its alias on your system so you can reuse it for subsequent backups. When you initiate a burn in the burnable folder, the current contents of tex-docs are written to the disc.

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 > 


    Mac OS X Tiger for Unix Geeks
    Mac OS X Tiger for Unix Geeks
    ISBN: 0596009127
    EAN: 2147483647
    Year: 2006
    Pages: 176

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net