LinuxCommandLibrary

gpgsplit

Split OpenPGP messages into smaller parts

SYNOPSIS

gpgsplit [options] [file]

PARAMETERS

--create-empty
    Create the first chunk even if it would be empty.

--force
    Overwrite existing files.

--ignore-garbage
    Ignore garbage at the beginning of the input file.

--max-size=
    Set the maximum size of each chunk to bytes. size can be specified with a unit such as 'k', 'M', 'G'.

--output=
    Set the output file name prefix to . If this option is not specified, the output file name prefix defaults to the input file name with the extension removed.

--suffix-format=
    Set the format of the suffix appended to the output file name prefix to . The format string may contain '%n' to be replaced with the chunk number.

--verbose
    Enable verbose output.

--version
    Display version information and exit.

--help
    Display a help message and exit.

DESCRIPTION

gpgsplit is a command-line utility designed to split large OpenPGP messages or files into smaller, manageable parts. This is particularly useful when dealing with email systems or other applications that have limitations on the maximum size of attachments or messages.

The command operates by dividing the input file into chunks, each of which contains a complete OpenPGP packet. The default size of each chunk is controlled by parameters, balancing the need for small parts against the overhead of having a large number of files.

The generated parts can then be processed individually or reassembled using gpg --concatenate. gpgsplit provides flexibility in managing large OpenPGP data, ensuring compatibility with systems that might not be able to handle large files directly. It is an essential tool for handling encrypted data in constrained environments.

EXAMPLE

To split a file named 'message.gpg' into smaller parts, using a maximum chunk size of 1MB and an output prefix of 'part-', you would use the following command:

gpgsplit --max-size=1M --output=part- message.gpg

This will generate files named part-000, part-001, part-002, etc., each containing a chunk of the original 'message.gpg' file.

REASSEMBLING

The parts created by gpgsplit can be easily reassembled using gpg --concatenate. For example:

gpg --concatenate part-* > original.gpg

will recreate the original message.

SEE ALSO

gpg(1), gpg-agent(1), gpgconf(1), gpg-connect-agent(1)

Copied to clipboard