Software⏱️ 4 min read📅 2026-06-11

How to Fix: Cannot zip a mutli-part archive, zip -FF command failing with out of memory error

Failed to zip large multi-part archive using -FF option due to out of memory error.

Quick Answer: Try using the -fz option or splitting the archive into smaller parts before zipping.

The error 'zip -FF command failing with out of memory error' occurs when attempting to create a multi-part archive using the `cat` and `zip` commands. This issue affects users who are trying to concatenate multiple files into a single archive, but encounter an out-of-memory error due to the large size of the resulting file.

This error can be frustrating, especially when working with large files or archives. However, by following the steps outlined below, you should be able to resolve this issue and successfully create your multi-part archive.

⚠️ Common Causes

  • The primary reason for this error is that the `zip -FF` command is attempting to write a file that exceeds the available memory on the system. This can happen when creating large archives with multiple parts, which can result in an out-of-memory error.
  • An alternative cause of this error could be related to the compression algorithm used by the `zip` command. If the compression algorithm is set too aggressively, it may not handle very large files well, leading to an error.

🔧 Proven Troubleshooting Steps

Splitting the archive into smaller parts

  1. Step 1: To resolve this issue, you can try splitting the archive into smaller parts using the `split` command. This will allow you to create a new part of the archive each time, rather than trying to write the entire file in one go.
  2. Step 2: For example, you can use the following command: `split -b 2G xxx.zip xxx-part1.zip`. This will split the archive into parts that are approximately 2GB in size. You can then zip these individual parts together using the `-FF` option.
  3. Step 3: Repeat this process for each part of the original archive, and then combine them back together using the `cat` command: `cat xxx-part*.zip > final_xxx.zip`. This should allow you to create a single multi-part archive without running out of memory.

Using a different compression algorithm

  1. Step 1: Alternatively, you can try using a different compression algorithm that is more suitable for large files. For example, you can use the `bzip2` command instead of `zip`. This will allow you to compress the archive at a lower compression ratio, which may help avoid the out-of-memory error.
  2. Step 2: To do this, you would need to modify your shell script or command to use `bzip2` instead of `zip`. For example: `cat xxx.z01 yyy.zip >xxx.zip; bzip2 -c xxx.zip | bzip2 -d >final_xxx.zip`. This will compress the archive using `bzip2`, which may be more suitable for large files.

🎯 Final Words

By following these steps, you should be able to resolve the 'out of memory' error when creating a multi-part archive. Remember to split your archive into smaller parts or use a different compression algorithm to avoid running out of memory.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions