How To Install Rar In Linux
RAR is most popular tool for creating and extracting compressed archive (.rar) files. When we download a annal files from the spider web, we required arar tool to excerpt them. RAR is available freely nether Windows operating systems to handle compressed files, but unfortunatelyrar tool doesn't pre-installed under Linux systems, we need to install it using tertiary-party tools toopen,extract,uncompress orunrar a archive files.
The guide explains how to installunrar andrar control-line tools usingRPMforge repository under Linux systems withyum (Yellowdog Updater, Modified) command with their applied examples.
Enable RPMForge Repository for RHEL/CentOS/Fedora
We must starting time install and enableRPMForge repository nether Linux systems to installUnrar andRarcommand-line applications. We take providedRPMForge repositories forRHEL/CentOS6/five/4distributions. By defaultRPMForge repository already shipped withFedora 17-12 systems, And so fedora user'due south don't demand to install it again.
For RHEL/CentOS 6/5/4 – 32-Bit OS
## RHEL/CentOS 6 32-Bit ## # wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.v.2-2.el6.rf.i686.rpm # rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.i686.rpm ## RHEL/CentOS v 32-Flake ## # wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-ii.el5.rf.i386.rpm # rpm -Uvh rpmforge-release-0.five.2-2.el5.rf.i386.rpm ## RHEL/CentOS four 32-Bit ## # wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-1.el4.rf.i386.rpm # rpm -Uvh rpmforge-release-0.five.2-ane.el4.rf.i386.rpm
For RHEL/CentOS 6/5/4 – 64-Bit Bone
## RHEL/CentOS 6 64-Bit ## # wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-ii.el6.rf.x86_64.rpm # rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm ## RHEL/CentOS 5 64-Scrap ## # wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.five.ii-2.el5.rf.x86_64.rpm # rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm ## RHEL/CentOS 4 64-Bit ## # wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.five.two-2.el4.rf.x86_64.rpm # rpm -Uvh rpmforge-release-0.v.2-2.el4.rf.x86_64.rpm
Once you've enabledRPMforge repository for systems. Follow the below instillation instructions with their examples.
Step i: How to Install Unrar in Linux
# yum install unrar
Sample Output
Loaded plugins: fastestmirror Loading mirror speeds from buried hostfile Dependencies Resolved ========================================================================================= Bundle Arch Version Repository Size ========================================================================================= Installing: unrar i386 4.2.3-one.el5.rf rpmforge 123 thou Transaction Summary ========================================================================================= Install 1 Package(south) Upgrade 0 Package(s) Total download size: 123 k Is this ok [y/North]: y Downloading Packages: unrar-4.two.3-1.el5.rf.i386.rpm | 123 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Exam Transaction Examination Succeeded Running Transaction Installing : unrar 1/1 Installed: unrar.i386 0:four.2.3-1.el5.rf Complete!
Step two: How to Open/Extract a RAR File in Linux
To open/extract aRAR file in current working directory, merely use the following command withunrar due east pick.
# unrar eastward linuxsecrets.rar UNRAR 4.xx beta 3 freeware Copyright (c) 1993-2012 Alexander Roshal Extracting from linuxsecrets.rar Extracting alphabetize.php OK Extracting alphabetize.html OK Extracting xyz.txt OK Extracting abc.txt OK All OK
To open/excerpt aRAR file in specific path or destination directory, merely use theunrar due east option, it volition extract all the files in specified destination directory.
# unrar eastward linuxsecrets.rar /home/ UNRAR 4.20 beta three freeware Copyright (c) 1993-2012 Alexander Roshal Extracting from linuxsecrets.rar Extracting /home/alphabetize.php OK Extracting /habitation/index.html OK Extracting /dwelling house/xyz.txt OK Extracting /home/abc.txt OK All OK
To open/extract aRAR file with their original directory structure. just issue below command withunrar x option. It will extract according their folder structure see below output of the control.
# unrar x linuxsecrets.rar UNRAR 4.twenty beta 3 freeware Copyright (c) 1993-2012 Alexander Roshal Extracting from linuxsecrets.rar Creating linuxsecrets OK Extracting linuxsecrets/alphabetize.php OK Extracting linuxsecrets/alphabetize.html OK Extracting linuxsecrets/xyz.txt OK Extracting linuxsecrets/abc.txt OK Creating default OK Extracting default/alphabetize.php OK Extracting default/alphabetize.html OK Creating include OK Extracting include/abc.txt OK Creating php OK Extracting php/xyz.txt OK All OK
Step 3: How to List a RAR File in Linux
To list a files inside a archive file utiliseunrar l choice. It will display the list of files with theirsizes,appointment,time andpermissions.
unrar l linuxsecrets.rar UNRAR four.20 beta three freeware Copyright (c) 1993-2012 Alexander Roshal Archive linuxsecrets.rar Name Size Packed Ratio Date Fourth dimension Attr CRC Meth Ver ------------------------------------------------------------------------------- index.php 0 8 0% eighteen-08-12 xix:xi -rw-r--r-- 00000000 m3b 2.9 index.html 0 8 0% 18-08-12 19:eleven -rw-r--r-- 00000000 m3b 2.9 xyz.txt 0 8 0% xviii-08-12 19:eleven -rw-r--r-- 00000000 m3b ii.9 abc.txt 0 eight 0% 18-08-12 nineteen:eleven -rw-r--r-- 00000000 m3b two.9 alphabetize.php 0 viii 0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.9 index.html 0 viii 0% 18-08-12 xix:22 -rw-r--r-- 00000000 m3b ii.9 abc.txt 0 viii 0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.nine xyz.txt 0 8 0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b two.9 ------------------------------------------------------------------------------- 8 0 64 0%
Footstep 4: How to Test a RAR File in Linux
To test an integrity of a archive file, utilize choiceunrar t. The below control will perform a consummate integrity check for each file and displays the status of the file.
unrar t linuxsecrets.rar UNRAR iv.twenty beta 3 freeware Copyright (c) 1993-2012 Alexander Roshal Testing archive linuxsecrets.rar Testing linuxsecrets/alphabetize.php OK Testing linuxsecrets/index.html OK Testing linuxsecrets/xyz.txt OK Testing linuxsecrets/abc.txt OK Testing default/alphabetize.php OK Testing default/index.html OK Testing include/abc.txt OK Testing php/xyz.txt OK All OK
Theunrar command is used to extract, list or exam archive files just. It has no whatever option for creatingRAR files under Linux. So, here nosotros need to installRAR control-line utility to create archive files.
Pace 5: How to Install Rar in Linux
To installRAR control selection in Linux, just execute following command.
yum install rar
Sample Output
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Dependencies Resolved ========================================================================================= Package Arch Version Repository Size ========================================================================================= Installing: rar i386 3.8.0-1.el5.rf rpmforge 264 k Transaction Summary ========================================================================================= Install 1 Package(s) Upgrade 0 Package(s) Total download size: 264 g Is this ok [y/Due north]: y Downloading Packages: rar-iii.eight.0-ane.el5.rf.i386.rpm | 264 kB 00:01 Running rpm_check_debug Running Transaction Test Finished Transaction Exam Transaction Exam Succeeded Running Transaction Installing : rar 1/1 Installed: rar.i386 0:3.8.0-1.el5.rf Complete!
Pace 6: How to Create Rar File in Linux
To create a archive(RAR) file in Linux, run the following command withrar a option. It will create archive file for alinuxsecrets directory.
rar a linuxsecrets.rar linuxsecrets RAR 3.80 Copyright (c) 1993-2008 Alexander Roshal 16 Sep 2008 Shareware version Type RAR -? for help Evaluation copy. Please register. Creating archive linuxsecrets.rar Adding linuxsecrets/index.php OK Adding linuxsecrets/index.html OK Adding linuxsecrets/xyz.txt OK Adding linuxsecrets/abc.txt OK Adding linuxsecrets OK Done
Footstep vii: How to Delete files from Archive
To delete a file from a archive file, run the command.
rar d filename.rar
Step 8: How to Recover Archives
To recover or set a archive file or files, run the control with selectionrar r.
rar r filename.rar RAR 3.80 Copyright (c) 1993-2008 Alexander Roshal sixteen Sep 2008 Shareware version Blazon RAR -? for assist Building fixed.linuxsecrets.rar Scanning... Data recovery record not establish Reconstructing linuxsecrets.rar Building rebuilt.linuxsecrets.rar Found linuxsecrets\index.php Establish linuxsecrets\index.html Found linuxsecrets\xyz.txt Establish linuxsecrets\abc.txt Found linuxsecrets Done
Pace 9: How to Update Athenaeum
To update or add files to existing archive file, use the post-obit command with optionrar u.
rar u linuxsecrets.rar linuxsecrets.sql RAR three.80 Copyright (c) 1993-2008 Alexander Roshal 16 Sep 2008 Shareware version Type RAR -? for assist Evaluation copy. Please annals. Updating archive linuxsecrets.rar Adding linuxsecrets.sql OK Done
Now, verify that the filelinuxsecrets.sql is added to archive file.
rar l linuxsecrets.rar RAR 3.80 Copyright (c) 1993-2008 Alexander Roshal 16 Sep 2008 Shareware version Blazon RAR -? for help Archive linuxsecrets.rar Name Size Packed Ratio Date Time Attr CRC Meth Ver ------------------------------------------------------------------------------- alphabetize.php 0 viii 0% eighteen-08-12 19:11 -rw-r--r-- 00000000 m3b ii.9 index.html 0 8 0% 18-08-12 nineteen:eleven -rw-r--r-- 00000000 m3b ii.9 xyz.txt 0 8 0% xviii-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9 abc.txt 0 eight 0% eighteen-08-12 19:11 -rw-r--r-- 00000000 m3b two.9 linuxsecrets 0 0 0% 18-08-12 nineteen:23 drwxr-xr-x 00000000 m0 2.0 linuxsecrets.sql 0 8 0% xviii-08-12 19:46 -rw-r--r-- 00000000 m3b 2.9 ------------------------------------------------------------------------------- vi 0 xl 0%
Step ten: How to Gear up Countersign to Archives
This is very interesting characteristic fromRar tool, it allows us to set a password to annal file. To countersign protect archive file use optionrar a -p.
rar a -p linuxsecrets.rar Enter password (will not be echoed): Reenter password: AR 3.eighty Copyright (c) 1993-2008 Alexander Roshal 16 Sep 2008 Shareware version Type RAR -? for assistance Evaluation copy. Please register. Updating archive linuxsecrets.rar Updating linuxsecrets.sql OK Done
Now verify it past extracting the archive file and see whether information technology volition prompt u.s.a. to enter countersign that we take set above.
rar x linuxsecrets.rar RAR 3.80 Copyright (c) 1993-2008 Alexander Roshal 16 Sep 2008 Shareware version Type RAR -? for help Extracting from linuxsecrets.rar Creating linuxsecrets OK Extracting linuxsecrets/alphabetize.php OK Extracting linuxsecrets/index.html OK Extracting linuxsecrets/xyz.txt OK Extracting linuxsecrets/abc.txt OK Enter countersign (will not exist echoed) for linuxsecrets.sql: Extracting linuxsecrets.sql OK All OK
Step 11: How to Lock Archives
Another interesting lock feature from rar tool, it provides a option to lock a item archive file from extracting information technology.
rar k linuxsecrets.rar RAR 3.eighty Copyright (c) 1993-2008 Alexander Roshal xvi Sep 2008 Shareware version Type RAR -? for assist Processing archive linuxsecrets.rar Locking archive Done
Decision
For morRAR andUnrar options and usage, run the post-obit control information technology will display a listing of options with their clarification.
# man unrar # homo rar
Nosotros have presented well-nigh all of the options above forrar andunrar commands with their examples. If y'all feel that we've missed anything in this list and you would like us to add together, please update the states using annotate course below.
Source: https://www.linuxsecrets.com/about-us/25-articles-five-years-older/4222-0681
Posted by: holderenditarray.blogspot.com
0 Response to "How To Install Rar In Linux"
Post a Comment