Linux tips - How to extract rar file in Slackware

Slackware Linux does not include unrar in default installation. You need to install unrar manually to extract rar file. Go to Slackbuild website and search for unrar.

Download unrar source and unrar slackbuild scripts.

Slackbuild unrar download image

When the download finished, switch to Slackware command line terminal and login as root. You can also open root shell in kde. Click Start --> System --> More Applications --> Terminal Program - Super User Mode.

Copy or move unrar slackbuild script to the dedicated directory and extract it. You can see examples on how to do this in the Prepare Slackbuild environment tutorial for more information about slackbuild preparation.

root@slackware:~# cd /home/slackware/source/myslackware/
root@slackware:/home/slackware/source/myslackware# mv /home/luzar/Desktop/unrar.tar.gz .
root@slackware:/home/slackware/source/myslackware# tar zxvf unrar.tar.gz
unrar/
unrar/README
unrar/unrar.1.gz
unrar/unrar.info
unrar/slack-desc
unrar/unrar.SlackBuild
root@slackware:/home/slackware/source/myslackware#

Copy or move unrar source into the extracted unrar slackbuild directory:

root@slackware:/home/slackware/source/myslackware# cd unrar
root@slackware:/home/slackware/source/myslackware/unrar# mv /home/luzar/Desktop/unrarsrc-3.8.5.tar.gz .
root@slackware:/home/slackware/source/myslackware/unrar#

Run unrar slackbuild script:

root@slackware:/home/slackware/source/myslackware/unrar# ./unrar.SlackBuild

Change directory to /tmp and install the Slackware unrar package that we just created. You can also keep a copy of the package to use in the future.

root@slackware:/tmp# installpkg unrar-3.8.5-i486-1_SBo.tgz
Installing package unrar-3.8.5-i486-1_SBo...
PACKAGE DESCRIPTION:
unrar: unrar (unpacker for the RAR archive format)
unrar:
unrar: WinRAR is a powerful archive manager. Unrar is an opensource subset
unrar: of RAR from rarlab that can uncompress RAR images.
unrar:
unrar: unrar home: http://www.rarlab.com/rar_add.htm
unrar:

root@slackware:/tmp# cp unrar-3.8.5-i486-1_SBo.tgz /home/slackware/packages/
root@slackware:/tmp# 

How to extract rar file

To extract rar file from command line terminal, you can use unrar e option to extract it to current directory. See example below:

luzar@slackware:~/work-area$ unrar e tdm-ob2-subtitles.rar

UNRAR 3.80 freeware      Copyright (c) 1993-2008 Alexander Roshal


Extracting from tdm-ob2-subtitles.rar

Extracting  tdm-ob2a.srt                                              OK
Extracting  tdm-ob2b.srt                                              OK

tdm-ob2a.srt already exists. Overwrite it ?
[Y]es, [N]o, [A]ll, n[E]ver, [R]ename, [Q]uit y

Extracting  tdm-ob2a.srt                                              OK

tdm-ob2b.srt already exists. Overwrite it ?
[Y]es, [N]o, [A]ll, n[E]ver, [R]ename, [Q]uit y

Extracting  tdm-ob2b.srt                                              OK
All OK
luzar@slackware:~/work-area$

To extract rar file from kde or gnome, right-click rar file icon and choose Extract. Choose location for the extracted files. See example screenshot below:

Unrar file from kde screenshot image

That's all. Here is the result package of the example above if you don't have time to build one for yourself. However, www.basicconfig.com and the writer do not responsible for any harm done to your system. By using this package, you are agreed to the Web Site Agreement. Use it at your own risk.

Download Slackware 12.2 unrar-3.8.5-i486-1_SBo.tgz package.


Post new comment

The content of this field is kept private and will not be shown publicly.
This blog uses the CommentLuv Drupal plugin which will try and parse your sites feed and display a link to your last post, please be patient while it tries to find it for you.

Custom Search