X

Clear dot-underscore files to fix Finder Archive hangs

In Snow Leopard, some people have had problems with the Finder's archive process, where it will pause indefinitely and fail to complete the compression.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
2 min read

In OS X, the Finder comes with a handy archiving option (called "Archive" in OS X prior to Leopard, and "Compress" 10.5 and above) that is available in the contextual menus as well as in the File menu. This feature will compress all selected files and folders into a ZIP archive for easy transfer to hard disks, network shares, or internet folders. In Snow Leopard, some people have had problems with the archive process, where it will pause indefinitely and fail to complete the compression.

In Leopard and Snow Leopard the archive function is called Compress.

For most affected users, this problem will happen toward the end of the compression, when the system claims there are only a few seconds remaining in the process. While it will occur on the OS X boot drive and other local file systems, it seems to happen more frequently on files and folders that were transferred between different file systems, especially FAT and networked file systems.

This problem happens because the system is having trouble managing the dot-underscore files (i.e, "._filename") that are present in the folder being compressed. For some reason the zip compression routine used for Apple's Archive feature may hang when encountering these files.

The dot-underscore files are the resource forks that were part of the file structure on HFS volumes before OS X. While OS X will still handle forked file support on HFS disks, many file systems and file sharing services will not (i.e., SMB shares, UFS volumes, and NFS shares). When forked files are copied to these disks, they will be split by Apple's Apple Double mechanism so the resource fork is preserved instead of being discarded by other file systems. The Apple Double process creates the dot-underscore file that contains the resource fork contents of the original file.

The resource fork for files is usually minimal and contains no important data, so for the most part you will not lose any data if you just delete them; however, the safest way to manage them is to merge them back with the original file. If the folder being compressed only has a few dot-underscore files, you can just remove the files, especially if they are minimal in size (4KB or less); however, merging them may be just as easy, which can be done by using the "dot_clean" terminal command.

This can be done by first ensuring the volume is formatted to HFS (Mac OS, or Mac OS Extended), which will ensure that the file system supports forked files, and then use the dot_clean command in the Terminal with the following procedure:

  1. Open the Terminal
  2. Type "dot_clean", followed by a single space
  3. Drag the folder containing dot-underscore files to the terminal window
  4. Press enter

Once the dot_clean command has been run on the folder, try compressing the desired files and folders again.



Questions? Comments? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.