Tip for newbies: Compress a file and split into small rar file parts

You may at times need to create a series of small compress files for a big file ( for instance, when you want to upload a very big file to Mediafire or Rapidshare, you will need to split this file into small parts). In Windows, the most popular tool for this task is WinRar to create rar files. In Linux, you can use the rar utility to compress a big file then split in into small parts as well. The command to compress a file then split into small rar file parts is:
 rar a -v#k -R output-file.rar input-file  

In this command, "-v#k" is the maximum size of a part in kilobytes ( you need to replace the "#" symbol which a specific number), output-file.rar is the output files after the compressing process ( which will be output-file.part1.rar, output-file.part2.rar, output-file.part3.rar ...), input-file is the file you need to compress and then split.

Take an example that you want to compress and split the file "example.iso" into small parts, the maximum size of each part is 150 MB ( 150x1024 = 153600 kB). The command you would use is:
 rar a -v153600k -R output.rar example.iso  

Assume that the file example.iso is around 400 MB, after the compressing process, you will have 3 rar files named respectively output.part1.rar, output.part2.rar and output.part3.rar. The first two parts will be 150MB for each, the 3rd part will be 100MB. To decompress these files, you just need to run the unrar utility for the first part and it will decompress all the other parts.

split rar files in Linux
Since rar and unrar are not pre-installed in Ubuntu, if you want to use these packages, the installing command will be:

 sudo apt-get install rar unrar  

In Arch Linux, you can only find rar in the AUR. Click here to download the aur package of rar.
linux tips and tricks