How to install rar and unrar commands in Linux

  
                

We often download some compressed files online, so compression and decompression are also things we often do. In Linux, we can use rar and unrar commands to compress and decompress, but many users do not know in Linux. How to install these two commands. Let Xiaobian tell you now.

Installation:

to 3.8.0 version, for example, if a 64-bit platform, execute the following command, you can also go to the official website to download the latest version :):

wget http://www.rarlab.com/rar/rarlinux-x64-4.2.0.tar.gz

rar software does not need to be installed, directly extract to /usr/local, the following operations Need to have root privileges.

#tar zxvf rarlinux-x64-4.2.0.tar.gz -C /usr/local

At this point, /usr/local/rar will have rar command and unrar command . You can create a connection under /usr/local/bin

#ln -s /usr/local/rar/rar /usr/local/bin/rar

#ln -s /usr/Local/rar/unrar /usr/local/bin/unrar

How to use: rar Command usage

a Add files to compressed file

c Add compressed file comments ( The maximum size of the comment cannot exceed 62000 bytes.

cf Add file comments (display file comments when using ’v’ parameters, the maximum can not exceed 32767 bytes)

ch Change compressed file Parameters

cw Write file comments to the specified file

d Delete files from the file

e Unzip the file to the current directory (do not create any subdirectories)

f Refresh the files in the archive (update these files since they were packaged, do not add new ones to the compressed archive)

i[par]= Find specific characters in the archive

k Lock the file (any command that attempts to change the contents of the compressed file will be ignored)

l[t,b] List the file [technical, bare]

m[f] Move to compressed file [for file only]

p Print file to standard output

r Patch compressed file

rc Rebuild lost volume
>

rn Renaming files in compressed archives

rr[N] Adding data recovery records

rv[N] Creating recovery volumes

s[name

Copyright © Windows knowledge All Rights Reserved