精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學習啦 > 學習電腦 > 操作系統(tǒng) > Linux教程 > linux的unrar解壓命令的詳細解釋

      linux的unrar解壓命令的詳細解釋

      時間: 佳洲1085 分享

      linux的unrar解壓命令的詳細解釋

        Linux中的unrar命令主要是用來解壓rar格式的壓縮文件。下面由學習啦小編為大家整理了Linux的unrar解壓命令的詳細解釋,希望對大家有幫助!

        linux的unrar解壓命令的詳細解釋

        用途說明

        現(xiàn)在常用的壓縮文件格式是rar格式,使用頻率甚至超過了zip格式,WinRAR可以壓縮和解壓rar文件。根據(jù)Google趨勢的統(tǒng)計,winrar與winzip的全球平均訪問量是1.00比0.43(點此看趨勢記錄 ),而中國范圍的訪問量更是1.00比0.14(點此看趨勢記錄 )。而Linux一般情況下是不能解壓rar文件的,有一種變通的方法,就是先用WinRAR將rar格式的壓縮包轉(zhuǎn)換成zip包,然后上傳至Linux使用unzip解壓。如果安裝了rarlinux,就使得在Linux下直接解壓rar文件成為可能,要注意的是該軟件的某個版本可能并不適用于所有Linux版本??梢缘絎inRAR官方網(wǎng)站去下載rarlinux,當前版本是3.9.3。本文后面也提供了三個版本的rarlinux,一個是3.0,一個是3.6.0,一個是3.9.3。經(jīng)過我的測試,3.6.0版本可以用于RHEL3.X版本,但3.9.3不行,只能用于更高版本的Linux,而3.0版本可以用于紅帽子7.3。而根據(jù)rarlinux安裝包中的technote.txt中所說“THE ARCHIVE FORMAT DESCRIBED BELOW IS ONLY VALID FOR VERSIONS SINCE 1.50”,其實只要rarlinux版本高于1.50就可解壓絕大部分rar文件。因此,如果要在Linux下使用rar,可以試一下本文后面附上的3.0版。

        常用參數(shù)

        rarlinux的安裝很簡單,只需要解壓就可以了。為了使用起來方便,可以將解壓后的目錄添加到PATH中,方便使用。

        首先將rarlinux-3.0.tar.gz上傳到Linux的某個目錄。

        [root@localhost setup]# ls -l rarlinux-3.0.tar.gz

        -rw-r--r-- 1 root root 502784 10月 19 09:45 rarlinux-3.0.tar.gz

        [root@localhost setup]# tar -C /opt -zxf rarlinux-3.0.tar.gz

        [root@localhost setup]# PATH=/opt/rar:$PATH

        使用-?參數(shù)可以查看幫助信息,x參數(shù)用于解壓文件, t參數(shù)用于測試是否損壞,l參數(shù)用于列出文件。

        unrar -? <== 獲取幫助

        unrar x <rar-file> <== 解壓文件

        unrar t <rar-file> <== 測試文件

        unrar l <rar-file> <== 列出文件

        下面是完整的使用方式,太復雜了,上面的幾種用法基本上就夠了。

        [root@localhost setup]# unrar -?

        UNRAR 3.00 freeware Copyright (c) 1993-2002 Eugene Roshal

        Usage: unrar <command> -<switch 1> -<switch N> <archive> <files...>

        <@listfiles...> <path_to_extract\>

        <Commands>

        e Extract files to current directory

        l[t] List archive [technical]

        p Print file to stdout

        t Test archive files

        v[t] Verbosely list archive [technical]

        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

        ep Exclude paths from names

        f Freshen files

        idp Disable percentage display

        ierr Send all messages to stderr

        inul Disable all messages

        kb Keep broken extracted files

        o+ Overwrite existing files

        o- Do not overwrite existing files

        ow Save or restore file owner and group

        p[password] Set password

        p- Do not query password

        r Recurse subdirectories

        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>

        u Update files

        v Create volumes with size autodetection or 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 in specified list file

        y Assume Yes on all queries

        [root@localhost setup]#

        linux的unrar解壓命令使用示例

        示例一 使用unrar檢查完整性、列出文件和解壓文件

        假定你已經(jīng)安裝前面所述的安裝方式操作過了。首先把一個rar文件上傳到某個目錄。比如把add2cvs.rar上傳到/root/test/目錄中。

        [root@localhost test]# ls -l

        total 1

        -rw-r--r-- 1 root root 944 10月 19 11:20 add2cvs.rar

        [root@localhost test]# unrar t add2cvs.rar

        UNRAR 3.00 freeware Copyright (c) 1993-2002 Eugene Roshal

        Testing archive add2cvs.rar

        Testing add2cvs2.sh OK

        Testing add2cvs.sh OK

        Testing add2cvs0.sh OK

        Testing add2cvs1.sh OK

        All OK

        [root@localhost test]# unrar l add2cvs.rar

        UNRAR 3.00 freeware Copyright (c) 1993-2002 Eugene Roshal

        Archive add2cvs.rar

        Name Size Packed Ratio Date Time Attr CRC Meth Ver

        -------------------------------------------------------------------------------

        add2cvs2.sh 302 192 63% 22-10-10 11:32 .....A C7EA31AB m3b 2.9

        add2cvs.sh 314 204 64% 22-10-10 11:30 .....A 4F875213 m3b 2.9

        add2cvs0.sh 236 158 66% 22-10-10 11:32 .....A 0441BC49 m3b 2.9

        add2cvs1.sh 281 184 65% 22-10-10 11:32 .....A 13C47824 m3b 2.9

        -------------------------------------------------------------------------------

        4 1133 738 65%

        [root@localhost test]# unrar x add2cvs.rar

        UNRAR 3.00 freeware Copyright (c) 1993-2002 Eugene Roshal

        Extracting from add2cvs.rar

        Extracting add2cvs2.sh OK

        Extracting add2cvs.sh OK

        Extracting add2cvs0.sh OK

        Extracting add2cvs1.sh OK

        All OK

        [root@localhost test]# ls -l

        total 5

        -rw-r--r-- 1 root root 236 10月 22 2010 add2cvs0.sh

        -rw-r--r-- 1 root root 281 10月 22 2010 add2cvs1.sh

        -rw-r--r-- 1 root root 302 10月 22 2010 add2cvs2.sh

        -rw-r--r-- 1 root root 944 10月 19 11:20 add2cvs.rar

        -rw-r--r-- 1 root root 314 10月 22 2010 add2cvs.sh

        [root@localhost test]#

        示例二 rarlinux版本3.9.3在RHEL5.5下的安裝情況

        rarlinux版本3.9.3的rar_static可以用于RHEL 5.5,但rar和unrar缺少相關的so文件,因為libc版本要求高。

        [root@rhel55 rar]# lsb_release -a

        LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch

        Distributor ID: RedHatEnterpriseServer

        Description: Red Hat Enterprise Linux Server release 5.5 (Tikanga)

        Release: 5.5

        Codename: Tikanga

        [root@rhel55 tools]# ls -l rarlinux.tar.gz

        -rw-r--r-- 1 root root 833828 10-23 15:52 rarlinux.tar.gz

        [root@rhel55 tools]# tar zxf rarlinux.tar.gz

        [root@rhel55 tools]# cd rar

        [root@rhel55 rar]# ls

        default.sfx makefile rar rar_static readme.txt unrar

        license.txt order.htm rarfiles.lst rar.txt technote.txt whatsnew.txt

        [root@rhel55 rar]# ./rar

        ./rar: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./rar)

        [root@rhel55 rar]# ./unrar

        ./unrar: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./unrar)

        [root@rhel55 rar]# ./rar_static

        RAR 3.93 Copyright (c) 1993-2010 Alexander Roshal 15 Mar 2010

        Shareware version Type RAR -? for help

        Usage: rar <command> -<switch 1> -<switch N> <archive> <files...>

        <@listfiles...> <path_to_extract\>

        省略輸出

        [root@rhel55 rar]#

        示例三 rarlinux版本3.9.3在RHEL3.4下的安裝情況

        rarlinux版本3.9.3在RHEL3.4下出現(xiàn)段錯誤,根本沒法用。

        [root@web186 setup]# lsb_release -a

        LSB Version: 1.3

        Distributor ID: RedHatEnterpriseAS

        Description: Red Hat Enterprise Linux AS release 3 (Taroon Update 4)

        Release: 3

        Codename: TaroonUpdate4

        [root@web186 setup]# ls rarlinux.tar.gz -l

        -rw-r--r-- 1 root root 833828 10月 23 15:59 rarlinux.tar.gz

        [root@web186 setup]# tar zxf rarlinux.tar.gz

        [root@web186 setup]# cd rar

        [root@web186 rar]# ls

        default.sfx makefile rar rar_static readme.txt unrar

        license.txt order.htm rarfiles.lst rar.txt technote.txt whatsnew.txt

        [root@web186 rar]# ./rar

        ./rar: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by ./rar)

        ./rar: /lib/tls/libc.so.6: version `GLIBC_2.7' not found (required by ./rar)

        ./rar: /lib/tls/libc.so.6: version `GLIBC_2.3.4' not found (required by ./rar)

        [root@web186 rar]# ./unrar

        ./unrar: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by ./unrar)

        ./unrar: /lib/tls/libc.so.6: version `GLIBC_2.7' not found (required by ./unrar)

        ./unrar: /lib/tls/libc.so.6: version `GLIBC_2.3.4' not found (required by ./unrar)

        [root@web186 rar]# ./rar_static

        FATAL: kernel too old

        段錯誤 (core dumped)

        [root@web186 rar]#

        博主建議:如果您使用的rarlinux版本報如上的錯誤信息,請下載本文附件 rarlinux-3.0.tar.gz 嘗試一下。

      3634809