How Do I Split a Tar Gz File in Linux?
Contents

How do I split a tar file into multiple files?

You can split a potentially large tar file into multiple sub tar volumes using the tar -M -l -F switches.

  1. -M = multi-volume mode.
  2. -l = volume size limit (per volume file).

How do you split a gz file in Unix?

You can make use of zcat or “gunzip –c” to output the lines from the zip file without unzipping the actual file and then pipe the output to split command as follows. This should create files with 2000000 lines in each with the file. gz.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest