Use the Unrar command to extract *.rar format files under Linux

Source: Internet
Author: User
Tags rar stdin switches

  1. Download

    http://www.rarlab.com/download.html Download the appropriate version

  2. Installation

    [Email protected] ~]$ cat/etc/redhat-release
    Fedora release (twenty Four)
    [Email protected] ~]$ uname-r
    4.8.15-200.fc24.x86_64

    Tar zxvf rarlinux-x64-5.4.0.tar.gz
    CD rar
    Make
    Make install


  3. Use Help

    [Email protected] ~]$ Unrar

    UNRAR 5.40 freeware Copyright (c) 1993-2016 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
    EP Exclude Paths from Names
    EP3 Expand paths to full including
    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> additionally filter included files
    [Email protected] Read additional filter Masks from stdin
    [Email protected]<list> Read Additional filter masks from list file
    o[+|-] Set the overwrite mode
    Ol[a] Process Symbolic Links as the link [absolute paths]
    or Rename files automatically
    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 a 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 listed in specified list file
    Y assume Yes on all queries

4. Example

(1). View rar contents of the package:

#unrar L *.rar

Or

#unrar v *.rar

(2) test if the rar package can be decompressed successfully:

#unrar T *.rar

(3). Unzip to current folder:

#unrar e *.rar

(4). unzip to the specified folder:

#unrar x *.rar/tmp


This article is from the "12423429" blog, please be sure to keep this source http://12433429.blog.51cto.com/12423429/1891966

Use the Unrar command to extract *.rar format files under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.