split files

I needed to split a file into a smaller size and refreshed my memory on using split and cat commands. Here are my notes:

split --suffix-length=1 --bytes=1024m source_file prefix.

After the split command run, you should get files with the following names:prefix.a, prefix.b, prefix.c, etc.

To recreate the original file, just run the following command:

cat prefix.a prefix.b prefix.c > original_file
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s