Splitting large files into pieces that fit on a USB pen drive

Splitting large files into pieces that fit on a USB pen drive

The other day I had to transfer an approximately 1.5 GB file from my laptop to my desktop, which are not connected via any network. I thought I’d use my USB pen drive for this task, but found that it’s only a 1 GB drive.

My linux guru co-worker recommended looking into the linux utility “split”, which, and this may not come as a big surprise, split files into smaller chunks. So using this excellent utility, I transferred the file by doing this:

First I split the 1.5 GB file into smaller pieces. I used the “-b” option to define that each chuck should be no bigger than 750 MB is size:

As we can see, the file split resulted in three files, each prefixed with an “x”.

Next, I transferred the files to the desktop computer, one file a the time. On the desktop, I used the “cat” command to concatenate the files back into the original file:

Done! I had now copied the one big file one chuck at the time, but splitting it into smaller pieces.

Leave a Reply

%d bloggers like this: