How To Install RAR/UNRAR On Centos 7
To Install RAR/UNRAR on Centos 7
RAR files are compressed files created by the WinRAR archive. RAR files can be split into multi-volume archives when dealing with large file sets. Like Zip files, these files need to be extracted. In this tutorial, the method to install RAR/UNRAR on Centos 7 is covered.
Installation
Download the RAR package by using wget command.
[root@linuxhelp ~]# wget https://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz
--2018-09-27 07:06:36-- https://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz
Resolving www.rarlab.com (www.rarlab.com)... 5.135.104.98
Connecting to www.rarlab.com (www.rarlab.com)|5.135.104.98|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 536028 (523K) [application/x-gzip]
Saving to: ‘rarlinux-x64-5.5.0.tar.gz’
100%[======================================>] 536,028 144KB/s in 3.6s
2018-09-27 07:06:41 (144 KB/s) - ‘rarlinux-x64-5.5.0.tar.gz’ saved [536028/536028]
Extract the download file by using tar command.
[root@linuxhelp ~]# tar -zxvf rarlinux-x64-5.5.0.tar.gz
rar/
rar/order.htm
rar/acknow.txt
rar/readme.txt
rar/default.sfx
rar/license.txt
rar/rarfiles.lst
rar/whatsnew.txt
rar/makefile
rar/rar
rar/unrar
rar/rar.txt
Switch the rar directory.
[root@linuxhelp ~]# cd rar/
Set the environmental variable.
[root@linuxhelp rar]# cp -v rar unrar /usr/local/bin/
rar’ -> ‘/usr/local/bin/rar’
unrar’ -> ‘/usr/local/bin/unrar
Verfiy the rar application.
[root@linuxhelp rar]# rar
RAR 5.50 Copyright (c) 1993-2017 Alexander Roshal 11 Aug 2017
Trial version Type 'rar -?' for help
Usage: rar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract>
<Commands>
a Add files to archive
c Add archive comment
ch Change archive parameters
cw Write archive comment to file
d Delete files from archive
e Extract files without archived paths
f Freshen files in archive
i[par]=<str> Find string in archives
k Lock archive
l[t[a],b] List archive contents [technical[all], bare]
m[f] Move to archive [files only]
p Print file to stdout
r Repair archive
rc Reconstruct missing volumes
rn Rename archived files
rr[N] Add data recovery record
rv[N] Create recovery volumes
s[name|-] Convert archive to or from SFX
t Test archive files
.
.
.
r0 Recurse subdirectories for wildcard names only
rr[N] Add data recovery record
rv[N] Create recovery volumes
s[<N>,v[-],e] Create solid archive
s- Disable solid archiving
sc<chr>[obj] Specify the character set
sfx[name] Create SFX archive
si[name] Read data from standard input (stdin)
sl<size> Process files with size less than specified
sm<size> Process files with size more than specified
t Test files after archiving
ta<date> Process files modified after <date> in YYYYMMDDHHMMSS format
tb<date> Process files modified before <date> in YYYYMMDDHHMMSS format
tk Keep original archive time
tl Set archive time to latest file
tn<time> Process files newer than <time>
to<time> Process files older than <time>
ts[m|c|a] Save or restore file time (modification, creation, access)
u Update files
v<size>[k,b] Create volumes with size=<size>*1000 [*1024, *1]
ver[n] File version control
vn Use the old style volume naming scheme
vp Pause before each volume
w<path> Assign work directory
x<file> Exclude specified file
x@ Read file names to exclude from stdin
x@<list> Exclude files listed in specified list file
y Assume Yes on all queries
z[file] Read archive comment from file
[root@linuxhelp rar]# unrar
UNRAR 5.50 freeware Copyright (c) 1993-2017 Alexander Roshal
Usage: unrar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract>
<Commands>
e Extract files without archived paths
l[t[a],b] List archive contents [technical[all], bare]
p Print file to stdout
t Test archive files
v[t[a],b] Verbosely list archive contents [technical[all],bare]
x Extract files with full path
<Switches>
- Stop switches scanning
@[+] Disable [enable] file lists
ad Append archive name to destination path
ag[format] Generate archive name using the current date
ai Ignore file attributes
ap<path> Set path inside archive
c- Disable comments show
cfg- Disable read configuration
cl Convert names to lower case
cu Convert names to upper case
dh Open shared files
.
.
.
ow Save or restore file owner and group
p[password] Set password
p- Do not query password
r Recurse subdirectories
sc<chr>[obj] Specify the character set
sl<size> Process files with size less than specified
sm<size> Process files with size more than specified
ta<date> Process files modified after <date> in YYYYMMDDHHMMSS format
tb<date> Process files modified before <date> in YYYYMMDDHHMMSS format
tn<time> Process files newer than <time>
to<time> Process files older than <time>
ts[m|c|a] Save or restore file time (modification, creation, access)
u Update files
v List all volumes
ver[n] File version control
vp Pause before each volume
x<file> Exclude specified file
x@ Read file names to exclude from stdin
x@<list> Exclude files listed in specified list file
y Assume Yes on all queries
With this, the method to install RAR/UNRAR on Centos 7 comes to an end.
Comments ( 1 )