Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can use the <a href="https://www.gnu.org/software/coreutils/manual/html_node/split-invocation.html" rel="noreferrer"><code>split</code></a> command with the <code>-b</code> option:</p> <pre><code>split -b 1024m file.tar.gz </code></pre> <p>It can be reassembled on a Windows machine using @<a href="https://stackoverflow.com/questions/1120095/split-files-using-tar-gz-zip-or-bzip2/1120121#1120121">Joshua</a>'s answer.</p> <pre><code>copy /b file1 + file2 + file3 + file4 filetogether </code></pre> <hr> <p><strong>Edit</strong>: As @Charlie stated in the comment below, you might want to set a prefix explicitly because it will use <code>x</code> otherwise, which can be confusing.</p> <pre><code>split -b 1024m "file.tar.gz" "file.tar.gz.part-" // Creates files: file.tar.gz.part-aa, file.tar.gz.part-ab, file.tar.gz.part-ac, ... </code></pre> <hr> <p><strong>Edit</strong>: Editing the post because question is closed and the most effective solution is very close to the content of this answer:</p> <pre><code># create archives $ tar cz my_large_file_1 my_large_file_2 | split -b 1024MiB - myfiles_split.tgz_ # uncompress $ cat myfiles_split.tgz_* | tar xz </code></pre> <p>This solution avoids the need to use an intermediate large file when (de)compressing. Use the tar -C option to use a different directory for the resulting files. btw if the archive consists from only a single file, tar could be avoided and only gzip used:</p> <pre><code># create archives $ gzip -c my_large_file | split -b 1024MiB - myfile_split.gz_ # uncompress $ cat myfile_split.gz_* | gunzip -c &gt; my_large_file </code></pre> <p>For windows you can download ported versions of the same commands or use cygwin.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload