How to create ZIP archives in Mac OS X


Pros:

  1. Mac OS X file elements are retained if encoded and decoded using the correct Mac OS X tools.
  2. Multiple items contained in a single file that is easily transferable using any mechanism.
  3. Compressed format saves storage space and bandwidth.
  4. Uses ZIP format that can be decoded on nearly any system.

Cons:

  1. Requires additional encoding and decoding steps.
  2. No file checksums to verify content.
  3. The Finder doesn’t support the creation of encrypted archives.
  4. The Finder doesn’t support modifying existing archives.

Disk Image Deployment

Pros:

- Mac OS X file elements are always retained.

- Multiple items or even entire file systems can be contained in a single file that is easily transferable using any mechanism.- File checksum helps verify content.- Optional compressed format saves storage space and bandwidth.- Optional encrypted format secures items from unauthorized access.- Optional read/write format allows easy modification and expansion of disk image contents.- Variety of advanced deployment uses beyond simple items.

Cons:

- Requires additional creation, mounting, and copying steps.

- Most third-party systems are not able to open the Mac OS X disk image format.

- Can be complex for inexperienced users.

Archiving for Deployment

Mac OS X has built-in support for archive files and supports ZIP, the most common file archive format. Files saved in this format use the .zip filename extension as their identifier. This format provides robust lossless compression and is accessible to every modern operating system. In this section, you will learn how to archive items in ZIP files and how to extract items from ZIP files.

Creating ZIP Archives

You can create a ZIP archive file from single or multiple items using the Finder or the command-line tool zip. By default, creating a ZIP archive file using either method will not delete the original documents you’ve selected to archive.

Creating ZIP Archives Using the Finder

To create a ZIP archive file in the Finder:

1 In the Finder, select the items you want to archive.

You can hold down the Shift key to quickly select contiguous lists of items, or hold down the Command key to quickly select noncontiguous items.

Put all the items in one folder, and then compress the folder rather than selecting multiple items. This extra step will help keep things orderly later, as the items will end up in the same folder when they are extracted.

2 Choose File > Compress Items.

The word Items in the menu will be replaced by the name of the item you have selected (if you selected just a single item) or the number of items you have selected(if you selected multiple items).

If the archival process is going to take more than a few seconds, the Finder will show a progress dialog with the estimated time required to complete the compression task. You can also choose to cancel the archive by clicking the small X button on the far right. When the archival process has completed, you will be left with a ZIP archive file named either Archive.zip or Item.zip, where Item is the name of the single item you chose to archive and compress. The ZIP archive file will be placed in the same location as the original items.

Once the archive process is complete, it’s always interesting to compare the original items’ size with the archive’s size using the Get Info or Inspector windows in the Finder. In many cases you can expect a 50 percent decrease in file size. On the other hand, many media formats are already quite compressed in their original form, so you may not see muchchange when compressing these types of files.

Creating ZIP Archives Using the Command Line

Mac OS X includes several command-line utilities that can create ZIP archive files, including the tar, ditto, and gzip commands. However, only the tar command (short for “tape archive”), which is built in to Mac OS X v10.5, properly archives all Mac OS Extended file elements. This is because the tar command first creates a tape archive of the items and then filters it through the gzip compression command. Unfortunately, the use of tar to create ZIP archives does not create files that are compatible with all third-party systems. In practice, though, one of the few reasons you would choose the ZIP archive format for deployment is for its third-party compatibility. Thus, from the command line you should use the zip command to create standard ZIP files that are compatible with nearly any third-party system.

The syntax for compressing files and folders is zip -r followed by the path to the newly created archive file including the .zip extension, and then the path(s) to the item(s) orfolder(s) you want to archive.

Legal Disclaimer

Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.


This article was sent to us by: George Zenitti at 06292010

Related Articles

1. What is the best selling Apple iPad Tablet
Many would think the 64gb 3G iPad tablet would be the best selling iPad tablet, but surprisingly it's not! According to our consumer statistics for the month of May 2010, t...

2. Short Apple Computers History
An alternative to the bus-oriented Altair design was the single-board microcomputer like the IMP-16C. Miniaturization made it possible to put a small computer comprised o...

3. Optimizing NetBoot Performance
The NetBoot service, and network-based system deployment in general, is among the most demanding services you can subject your network and servers to. Therefore, before s...

4. Mac OS X users manage their authorization rights
Even if you don’t want to enforce strict usage policies, you will still create accounts on Mac OS X for your users. The choices you make regarding user account types...

5. How to create simple NetBoot images
Many clients can read from the same NetBoot image, but when a client needs to write anything (such as print spools, browser caches, and other temporary files) back to its ...

6. Enabling ARD Remote Management
Apple Remote Desktop (ARD) 3 is the remote control, management, reporting, and deployment tool for Mac OS X systems. Every Mac OS X v10.5 system includes the client-side ...

7. Mac OS X file attributes and permissions
Mac OS X uses a unique file system, the Mac OS Extended format, that provides both perceived simplicity and enhanced metadata attributes. These file system features are r...

8. Printers in Snow Leopard and Gutenprint
Printers come in varying shapes, sizes, and configurations. As the primary output device on your computer, the printer becomes an important tool for converting the digital...

9. The NetBoot service explained in detail
The NetBoot service is most commonly used to provide a temporary operating system. In this article you will learn how to further accelerate the system deployment process b...

10. Acessing the Internet if you have Snow Leopard
Internet access refers to the ability of your computer to access the Internet, which allows you to browse web sites, check e-mail, and much more. The method by which you a...