Skip to content

Instantly share code, notes, and snippets.

@chahuja
Last active January 13, 2025 15:23
Show Gist options
  • Save chahuja/93fbff9d0bf7273fd5b07fcd00834fb5 to your computer and use it in GitHub Desktop.
Save chahuja/93fbff9d0bf7273fd5b07fcd00834fb5 to your computer and use it in GitHub Desktop.
Split files to parts or equal sizes and then stitch them back

Split a tar/zip file to multiple parts of size 1GB

split -b 1024m filename.tar.gz 'filename.tar.gz.part-'

Combine the split files to a single unit

Linux

cat filename.tar.gz.part-* > filename.tar.gz 

Windows

copy /b filename.tar.gz.part-aa + filename.tar.gz.part-ab + filename.tar.gz.part-ac filename.tar.gz

or

copy /b filename.tar.gz.part-* filename.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment