mahmood
mahmood

Reputation: 24735

split file to specific sizes with tar command

There is an iso file with 5.5 GB in size. I want to split that with tar command each part should be 500M. What is the command for that?

Upvotes: 1

Views: 4780

Answers (2)

Francisco R
Francisco R

Reputation: 4048

You can use split:

tar [your params] |split -b 500m - output_prefix

...Or use zip (or any other compressor):

tar [your params] | zip  -s 500m output.zip  -

Upvotes: 2

thiton
thiton

Reputation: 36059

It's not the job of tar to split files. Use split to split the tar file.

Upvotes: 3

Related Questions