Split Large file into smaller files

Today I was transferring a large 7 GB backup file into another server. Every time I copy it gets disconnected after some time and I have to transfer again. When transferring large files, it is better to split it into smaller files, this way if one of the file transfers failed, you only need to transfer this specific file again. With rsync, it make it easy as you can sync all files to remote server.

How to Split large CSV file into smaller files

To split a large file into smaller parts, run

split -b 500MB  LARGE_FILE.tar.gz

This command will split a large file into smaller files with 500 MB size each. You can specify a different size if you need.

Once all files are on the new server, you can combine them into one file with the command

cat * > LARGE_FILE.tar.gz

When you do cat *, make sure only split files are in the current folder.

Related Posts

tar
rsync

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *