Skip to content

Instantly share code, notes, and snippets.

@almirbraggio
Last active December 9, 2023 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almirbraggio/cf652784bede3230cf6e630a9ca38b3a to your computer and use it in GitHub Desktop.
Save almirbraggio/cf652784bede3230cf6e630a9ca38b3a to your computer and use it in GitHub Desktop.
Split & Join Files

We have a bigger iso file to compress to tar.gz and split it into 120 MB per parts:

$ tar -czvf file.tar.gz file.iso
$ split -b 120m file.tar.gz file.tar.gz.part-
$ ls
file.tar.gz.part-aa
file.tar.gz.part-ab
file.tar.gz.part-ac

To join this file, we can use cat command, then uncompress

$ cat file.tar.gz.part-* > file.tar.gz
$ tar -xzvf file.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment