Home > bash > Compress with RAR and split into multiple files

Compress with RAR and split into multiple files


You have a large file that you want to send to a friend. One possible way is to upload it to your Dropbox folder and when he got it you remove it. If the file is too big, split it into multiple smaller files. If your friend uses Windows, you should compress the file with ZIP or RAR. Here I show you how to do it with RAR.


rar a -m5 -v10m myarchive movie.avi

It will compress movie.avi and split it into 10 MB chunks (-v10m), using the best compression ratio (-m5). In the case of an AVI file it won’t help much, so here you could use -m0 too, which means no compression at all. The default is -m3 by the way. Output: myarchive.part1.rar, myarchive.part2.rar, etc.

If you prefer the traditional names (myarchive.rar, myarchive.r00, myarchive.r01, …), add the -vn switch too.


rar x myarchive.part1.rar

This entry is based on this post: http://linux.byexamples.com/archives/226/compress-to-multiple-volume-rar/.

Categories: bash Tags: , , ,
  1. February 29, 2012 at 20:53

    Great, thank you.

  2. April 5, 2013 at 09:58

    Thanks :) useful post.

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

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

%d bloggers like this: