Skip to content

Instantly share code, notes, and snippets.

@chaitanyagupta
Last active November 16, 2017 10:02
Show Gist options
  • Save chaitanyagupta/bdfd8bb4ba45cf8b09e2d460262d006a to your computer and use it in GitHub Desktop.
Save chaitanyagupta/bdfd8bb4ba45cf8b09e2d460262d006a to your computer and use it in GitHub Desktop.
Using the split command

An example:

cat file.ext | split -b 4m - file.ext.

This will create:

file.ext.aa
file.ext.ab
file.ext.ac
...

After every 4 MB.

To recreate the original file, just use cat:

cat file.ext.* >file.ext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment