zipsplit – Split a large zip archive into smaller archives

The zipsplit command is a Linux utility that allows users to split a large zip archive into smaller archives. This can be useful when transferring large files over a network or storing files on limited storage devices.

Overview

The syntax for using zipsplit is as follows:

zipsplit [options] filename

In this command, filename is the name of the zip archive to be split. zipsplit will create multiple smaller zip archives with the same name as the original archive, but with an added suffix indicating the split number. For example, if the original archive is named archive.zip, the split archives will be named archive.z01, archive.z02, and so on.

The options available for zipsplit are described in the table below.

Option Description
-n size Specifies the maximum size of each split archive in bytes, kilobytes (K), megabytes (M), or gigabytes (G). For example, -n 10M would split the archive into 10 megabyte chunks.
-r Recompresses the split archives, resulting in smaller file sizes.
-t Tests the integrity of the split archives after they have been created.
-v Displays verbose output during the split process.

Examples

To split an archive named largefile.zip into 100MB chunks, use the following command:

zipsplit -n 100M largefile.zip

This will create multiple split archives named largefile.z01, largefile.z02, and so on.

To split an archive named backup.zip into 50MB chunks and recompress them for smaller file sizes, use the following command:

zipsplit -n 50M -r backup.zip

This will create multiple split archives named backup.z01, backup.z02, and so on, with each archive compressed for smaller file sizes.

Troubleshooting Tips

One common issue when using zipsplit is running out of disk space during the split process. To avoid this, make sure that the destination directory has enough free space to accommodate the split archives.

Another issue that may arise is corruption of the split archives. To ensure that the split archives are not corrupted, use the -t option to test their integrity after they have been created.

Notes

It is important to note that zipsplit can only split archives in the ZIP format. If the original archive is in a different format, it must be converted to ZIP format before using zipsplit. Additionally, the split archives created by zipsplit can only be reassembled using the zip command.