linux下rar包的解壓方法
一.widonds下打包rar檔案並上傳
yum install lrzsz
rz test.rar
二、下載並安裝rar軟體
2.1 下載
mkdir -p /home/oldboy/tools
cd /home/oldboy/tools
wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz
2.2 安裝
tar zxvf rarlinux-3.8.0.tar.gz
cd rar
make
make install
三、rar命令語法
將/etc 目錄壓縮為etc.rar 命令為:
rar a etc.rar /etc
將etc.rar 解壓 命令為:
rar x etc.rar
unrar -e etc.tar
四、具體例子
例項:將/etc 目錄壓縮為etc.rar
[[email protected]]# rar a etc.rar /etc
RAR 3.80 Copyright (c) 1993-2008 Alexander Roshal 16 Sep 2008
Shareware version Type RAR -? for help
Evaluation copy. Please register.
Creating archive etc.rar
Adding /etc/gdm/securitytokens.conf OK
Adding /etc/gdm/Init/Default OK
Adding /etc/gdm/custom.conf OK
Adding /etc/gdm/Xsession OK
Adding /etc/gdm/PostSession/Default OK
Adding /etc/gdm/PreSession/Default OK
Adding /etc/gdm/XKeepsCrashing OK
Adding /etc/gdm/locale.alias OK
Adding /etc/gdm/PostLogin/Default.sample OK
省略若干行......
檢視
[[email protected]]# ll
總計 26704
-rw-r--r-- 1 root root 26505645 08-20 20:26 etc.rar
將etc.rar 解壓:
[[email protected]]# rar x etc.rar
RAR 3.80 Copyright (c) 1993-2008 Alexander Roshal 16 Sep 2008
Shareware version Type RAR -? for help
Extracting from etc.rar
Creating etc OK
Creating etc/gdm OK
Extracting etc/gdm/securitytokens.conf OK
Creating etc/gdm/Init OK
Extracting etc/gdm/Init/Default OK
Extracting etc/gdm/custom.conf OK
Extracting etc/gdm/Xsession OK
Creating etc/gdm/PostSession OK
Extracting etc/gdm/PostSession/Default OK
省略若干行......
五 更多命令 檢視幫助
[[email protected]]# rar
RAR 3.80 Copyright (c) 1993-2008 Alexander Roshal 16 Sep 2008
Shareware 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
cf Add files comment
ch Change archive parameters
cw Write archive comment to file
d Delete files from archive
e Extract files to current directory
f Freshen files in archive
i[par]=<str> Find string in archives
k Lock archive
l[t,b] List archive [technical, 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
u Update files in archive
v[t,b] Verbosely list archive [technical,bare]
x Extract files with full path
<Switches>
- Stop switches scanning
ad Append archive name to destination path
ag[format] Generate archive name using the current date
ap<path> Set path inside archive
as Synchronize archive contents
av Put authenticity verification (registered versions only)
av- Disable authenticity verification check
c- Disable comments show
cfg- Disable read configuration
cl Convert names to lower case
cu Convert names to upper case
df Delete files after archiving
dh Open shared files
ds Disable name sort for solid archive
dw Wipe files after archiving
e[+]<attr> Set file exclude and include attributes
ed Do not add empty directories
en Do not put 'end of archive' block
ep Exclude paths from names
ep1 Exclude base directory from names
ep3 Expand paths to full including the drive letter
f Freshen files
hp[password] Encrypt both file data and headers
id[c,d,p,q] Disable messages
ierr Send all messages to stderr
ilog[name] Log errors to file (registered versions only)
inul Disable all messages
isnd Enable sound
k Lock archive
kb Keep broken extracted files
m<0..5> Set compression level (0-store...3-default...5-maximal)
mc<par> Set advanced compression parameters
md<size> Dictionary size in KB (64,128,256,512,1024,2048,4096 or A-G)
ms[ext;ext] Specify file types to store
n<file> Include only specified file
[email protected] Read file names to include from stdin
[email protected]<list> Include files in specified list file
o[+|-] Set the overwrite mode
ol Save symbolic links as the link instead of the file
or Rename files automatically
ow Save or restore file owner and group
p[password] Set password
p- Do not query password
r Recurse subdirectories
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>[N] Save or restore file time (modification, creation, access)
u Update files
v Create volumes with size autodetection or list all volumes
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
[email protected] Read file names to exclude from stdin
[email protected]<list> Exclude files in specified list file
y Assume Yes on all queries
z[file] Read archive comment from file
[[email protected]1-1 rar]# unrar
UNRAR 3.80 freeware Copyright (c) 1993-2008 Alexander Roshal
Usage: unrar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract\>
<Commands>
e Extract files to current directory
l[t,b] List archive [technical, bare]
p Print file to stdout
t Test archive files
v[t,b] Verbosely list archive [technical,bare]
x Extract files with full path
<Switches>
- Stop switches scanning
ad Append archive name to destination path
ap<path> Set path inside archive
av- Disable authenticity verification check
c- Disable comments show
cfg- Disable read configuration
cl Convert names to lower case
cu Convert names to upper case
dh Open shared files
ep Exclude paths from names
ep3 Expand paths to full including the drive letter
f Freshen files
id[c,d,p,q] Disable messages
ierr Send all messages to stderr
inul Disable all messages
kb Keep broken extracted files
n<file> Include only specified file
[email protected] Read file names to include from stdin
[email protected]<list> Include files in specified list file
o[+|-] Set the overwrite mode
or Rename files automatically
ow Save or restore file owner and group
p[password] Set password
p- Do not query password
r Recurse subdirectories
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>[N] 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
[email protected] Read file names to exclude from stdin
[email protected]<list> Exclude files in specified list file
y Assume Yes on all queries
相關推薦
linux下rar包的解壓方法
一.widonds下打包rar檔案並上傳 yum install lrzsz rz test.rar 二、下載並安裝rar軟體 2.1 下載 mkdir -p /home/oldboy/tools cd /home/oldboy/tools
linux下rar包的解壓縮方法
1.rz sz命令安裝 yum install lrzsz rz test.rar 2.下載安裝rar軟體 wget http://www.rarlab.com/rar/rarlinux-3.8.0
Linux下 rar包壓縮和解壓
一、RAR for Linux安裝 1、Linux本身不支援unrar和rar命令,需要我們安裝RAR for Linux,地址:https://www.rarlab.com/download.htm 選擇對應的版本進行下載。 2、命令列解壓:tar -xzf rarlinux-x
Linux下使用shell解壓打包jar包
linux 下使用shell解壓打包jar包 在工作做時,有時會碰到開發人員並沒有把配置檔案獨立出來,而量把他打包進了jar包裡面,這裡運維人員會產生很大的影響,特別的是在除錯需要經常修改配置檔案的時候,運維人員需要把jar包下載到本地,解壓,修改配置檔案,打包,在上傳。 極大的影響
Linux 下壓縮與解壓.zip和.rar
對於Window下的常見壓縮檔案.zip和.rar,Linux也有相應的方法來解壓它們:1)對於.zip linux下提供了zip和unzip程式,zip是壓縮程式,unzip是解壓程式。它們的引數選項很多,可用命令zip -help和unzip -help檢視,這裡只做簡單介紹,舉例說明一下其用法: # z
Linux下壓縮與解壓
zip壓縮解壓 壓縮: zip -r dist.zip dist/* 解壓: unzip dist.zip unzip -o dist.zip // 在不提示的情況下覆蓋檔案 unzip -o -d ~/Desktop/temp // -d指定解壓目錄 tar壓縮解壓
Linux下常用壓縮解壓命令
tar 解包:tar xvf FileName.tar 打包:tar cvf FileName.tar DirName (注:tar是打包,不是壓縮!) .gz 解壓1:gunzip FileName.gz 解壓2:g
Linux下常用壓縮 解壓命令和壓縮比率對比
常用的格式有: tar, tar.gz(tgz), tar.bz2, 不同方式,壓縮和解壓方式所耗CPU時間和壓縮比率也差異也比較大。 tar 只是打包動作,相當於歸檔處理,不做壓縮;解壓也一樣,只是把歸檔檔案釋放出來。 (1)打包歸檔格式: tar -
linux 下的各種解壓命令
.tar 解包:tar xvf FileName.tar 打包:tar cvf FileName.tar DirName (注:tar是打包,不是壓縮!) ——————————————— .gz 解壓
Linux下壓縮、解壓命令、壓縮比介紹說明
Linux下壓縮、解壓命令很多靈活度很大,不像在windows下winrar或360壓縮幾乎各佔版比江山,清一色的.rar .zip格式。Linux下常用的tar tar.gz tar.bz2 .Z等等格式種類繁多。而每種壓縮和解壓方式所耗CPU時間和壓縮比率也差異甚大。在此我一一列舉,
(轉)linux下tar命令解壓到指定的目錄
轉自:http://blog.sina.com.cn/s/blog_62449fcf0100nfar.html linux下tar命令解壓到指定的目錄 : #tar zxvf /bbs.tar.zip -C /zzz/bbs
Linux下的壓縮&解壓命令
【tar命令】 解壓:tar -zxvf FileName.tar 壓縮:tar -czvf FileName.tar DirName 【gz命令】 解壓1:gunzip FileName.gz 解壓2:gzip -d FileName.gz 壓
淺談Linux下各種壓縮 解壓命令和壓縮比率對比
轉載,收藏 tar命令是linux下非常常用的命令,這篇文章對該命令介紹的比較詳細,因此轉載加收藏吧。 Linux下壓縮、解壓命令五花八門,不像在windows下一個winrar打遍天下無敵手,清一色的.rar .zip格式。比如,Linux下常用的tar tar.gz
Linux下安裝zip解壓壓縮功能
liunx伺服器上預設沒有安裝zip命令,所以使用時需安裝: apt-get install zip 或 yum install zip linux安裝unzip命令: apt-get install unzip 或 yum install unzip
linux下jar的解壓和壓縮
在部署專案是需要對jar中的檔案進行編輯,這就要在linux命令列下對jar進行解壓縮操作。比如有個jar包,/usr/local/EtnetChinaApplication.jar解包到臨時目錄cd /usr/localunzip EtnetChinaApplicatio
Linux下建立與解壓zip, tar, tar.gz和tar.bz2檔案及該檔案壓縮對比
目前Linux下常見的壓縮副檔名: *.Z compress程式壓縮的檔案(最早期使用),壓縮後取代原始檔; *.zip一個誇平臺的檔案打包程式,適用於Linux、windows和Mac OS系統; *.bz2 bzip2程式壓縮的檔案; *.gz
Linux下壓縮與解壓操作總結
Linux下支援使用各種命令列軟體對檔案和壓縮包進行操作。但是,壓縮格式各種各樣,所需命令也不盡相同。因此,在此對Linux下壓縮與解壓操作進行總結。 1. zip 從.zip中提取特定的檔案。 有些時候,我們只需要壓縮包中的特定檔案。如果為了
Linux下檔案壓縮解壓
對於剛剛接觸Linux的人來說,一定會給Linux下一大堆各式各樣的檔名給搞暈。別個不說,單單就壓縮檔案為例,我們知道在Windows下最常見的壓縮檔案就只有兩種,一是,zip,另一個是.rap。可是Linux就不同了,它有.gz、.tar.gz、tgz、bz2、.Z、.ta
linux下打壓縮解壓
獨立 表示 屬性 末尾 jpg 一個 並且 輸出 中一 tar -c: 建立壓縮檔案-x:解壓-t:查看內容-r:向壓縮歸檔文件末尾追加文件-u:更新原壓縮包中的文件 這五個是獨立的命令,壓縮解壓都要用到其中一個,可以和別的命令連用但只能用其中一個。下面的參數是根據需要
linux 下所有格式打包解壓方法(tar、bz2、rar)詳解
01-.tar格式 解包:[*******]$ tar xvf FileName.tar 打包:[*******]$ tar cvf FileName.tar DirName(注:tar是打包,不是壓縮!) 02-.gz格式 解壓1:[*******]$ gunzip FileName.gz 解壓2:[**