Rar / Unrar on Linux

GIT – RAR files are in compressed archive format, if you have downloaded rar files from the Internet, you need to unpack or unrar them (extract rar files).

RAR is a proprietary file format for data compression and archiving, developed by Eugene Roshal. The used to extract these files is called “unrar”. By default, unrar is not being installed on , FreeBSD or UNIX like operating system. You can unrar with the help of apt-get or yum .

Install unrar command

Under or Linux, you need to type apt-get command as follows to install unrar program:

# apt-get install unrar

If you are using Fedora core Linux / / RHEL, use yum command as follows :

# yum install unrar

If you are using FreeBSD, enter:

# pkg_add -v -r unrar

If any of above, methods is not working for you, binary package from official rarlab site:

$ cd /tmp

$ wget http://www.rarlab.com/rar/rarlinux-4.2.0.tar.gz ( 32bit )
$ wget http://www.rarlab.com/rar/rarlinux-x64-4.2.0.tar.gz ( 64bit )

Next, untar file, enter:

$ tar -zxvf rarlinux-x64-4.2.0.tar.gz

Both unrar and rar commands are located in rar sub-directory. Just cd to rar directory, type:

$ cd rar

$ ./unrar

Now copy rar and unrar file to /bin directory, type:

# cp rar unrar /bin

HowTo: Use unrar Command

The unrar command supports various options, below are common options that you need to for extracting files.

Task: Exreact rar (unpack) File

To extract file.rar file into the current directory, enter:

$ unrar e file.rar

Task: List (l) file inside rar archive:

$ unrar l file.rar

Task: To extract (x) files with full path type command:

$ unrar x file.rar

(D) To test (t) integrity of archive, file type command:

$ unrar t file.rar

– Nếu bạn gặp lỗi: version `GLIBC_2.7′ not found (required by unrar) thì do bạn cài phiên bản unrar cao hơn 3.8, lúc này phải nâng cấp version của glibc lên 2.8 để fix nhé.

Thảo luận bài viết tại forum : http://forum.gocit.vn/threads/rar-unrar-on-linux.610/

Bài viết này nằm trong dự án  website : www.gocit.vn, forum hổ trợ forum.gocit.vn , xem thêm tại link http://www.gocit.vn/du-an-linux-toan-tap/
Print Friendly, PDF & Email



Bài viết liên quan

2 Trackbacks / Pingbacks

  1. Dự án Linux Toàn Tập | Hautph's Blog
  2. Hướng dẫn cài đặt & sử dụng Ubuntu / Linux Toàn tập | Nguyễn Bá Mãi

Để lại lời nhắn