Create and Extract RAR Files in Linux

I've been sharing mp3s with my close friends for years. We share mp3 files within our same interest in music. As I'm now a total Linux desktop user (I didn't use windows anymore ), I have to find way to create and extract RAR files in Linux since we share the files in compressed RAR files in less than 5MB split.

I always think that my findings in my Linux journey can also help others... So, here is the way to create RAR file in Ubuntu Linux.

First, make sure you have already install unrar and rar which you can get it by issuing this command in your terminal (Application > Accessories > Terminal) ...

$ sudo apt-get install rar unrar


In order to create RAR file, you can just right click on the selected files and click on "Create Archive...", select .rar on the archive dropdown and click on "Create". But, if you wanna extra control, you can use your great powerful terminal to do so. Here's what I do to Create a RAR file splitted to less than 5MB parts...

Open up your terminal and cd to directory with your file to RAR and split. As it is on my /home/apogee/Music directory, I'm going there to find my files. [Note: just type the command in bold without the dollar sign]

$ cd /home/apogee/Music
$ ls -lh *.mp3

-rw-r--r-- 1 apogee apogee 6.7M 2008-03-10 16:21 Senandung-malam.mp3

then I issue this command to create RAR file containing this mp3 file. I want each part to be less than 4MB...

$ rar a -v4000k Senandung-malam.mp3.rar Senandung-malam.mp3
RAR 3.70 beta 1 Copyright (c) 1993-2007 Alexander Roshal 8 Jan 2007
Shareware version Type RAR -? for help

Evaluation copy. Please register.

Creating archive Senandung-malam.mp3.rar

Adding Senandung-malam.mp3
Calculating the control sum

Creating archive Senandung-malam.mp3.part2.rar

... Senandung-malam.mp3 OK
Calculating the control sum
Done
$


Now I have two parts of rar files. Extracting these files should be more simpler on GUI. Check it out on my previous post on How to Extract RAR files in Ubuntu Linux. In case of many parts, just right click on the first part and choose extract here.

In order to do it in your terminal, just issue this command...

$ unrar e Senandung-malam.mp3.part1.rar .

The program will find for the continuous parts and extract the file. That's all.. Hope it helps you... Good Luck and have fun!





Comments

Unknown said…
thanks I'm new in Linux and this is exactly what i was looking for

Popular posts from this blog

How to Create Hyperlink on Blogger Post

How to Add a Sudo User on AlmaLinux 9.2 (Turquoise Kodkod): A Step-by-Step Guide

How to Check AlmaLinux Version on the Command Line: A Quick Guide