关于SegmentFault:Linux系统中解压命令rar的使用方法

50次阅读

共计 2745 个字符,预计需要花费 7 分钟才能阅读完成。

Linux 解压 rar 的办法步骤有哪些呢?这里良许教程网小编就给大家介绍下 Linux 解压 rar 的办法,心愿对你有所帮忙。
网上下载 rar 压缩文件的应用,在 linux 在咱们须要对其进行解压缩,这个时候,咱们须要装置 rar 相干的文件,来进行解压缩。

  1. 下载

咱们进入 rarlab 网站,进行下载 rar for linux x64

  1. 应用 tar 命令 解压(*.tar 用 tar –xvf)

1 Downloads tar -xvf rarlinux-x64-5.6.0.tar.gz

  1. 进入文件夹 make (须要 管理员权限)
1   rar cat makefile 
2   ###################################################################
3   # Installing RAR executables, configuration files and SFX modules #
4   # to appropriate directories                   #  
5   ###################################################################
6   PREFIX=/usr/local
7   install:
8    mkdir -p $(PREFIX)/bin
9    mkdir -p $(PREFIX)/lib
10   cp rar unrar $(PREFIX)/bin
11   cp rarfiles.lst /etc
12   cp default.sfx $(PREFIX)/lib%

如果不进行 make 须要在命令所在的文件夹执行命令,或者把文件夹退出环境变量中。

  1. 最初,能够应用 unrar 进行解压,应用 rar 命令,进行压缩。

咱们 能够间接输出 unrar 查看帮忙

1   rar ./unrar
2   UNRAR 5.60 freeware   Copyright (c) 1993-2018 Alexander Roshal
3   Usage:   unrar <command> -<switch 1> -<switch N> <archive> <files...>
4           <@listfiles...> <path_to_extract\>
5   <Commands>
6    e       Extract files without archived paths
7    l[t[a],b]   List archive contents [technical[all], bare]
8    p       Print file to stdout
9    t       Test archive files
10    v[t[a],b]   Verbosely list archive contents [technical[all],bare]
11    x       Extract files with full path
12   <Switches>
13    -       Stop switches scanning
14    @[+]     Disable [enable] file lists
15    ad      Append archive name to destination path
16    ag[format]  Generate archive name using the current date
17    ai      Ignore file attributes
18    ap<path>   Set path inside archive
19    c-      Disable comments show
20    cfg-     Disable read configuration
21    cl      Convert names to lower case
22    cu      Convert names to upper case
23    dh      Open shared files
24    ep      Exclude paths from names
25    ep3      Expand paths to full including the drive letter
26    f       Freshen files
27    id[c,d,p,q]  Disable messages
28    ierr     Send all messages to stderr
29    inul     Disable all messages
30    kb      Keep broken extracted files
31    n<file>    Additionally filter included files
32    n@      Read additional filter masks from stdin
33    n@<list>   Read additional filter masks from list file
34    o[+|-]    Set the overwrite mode
35    ol[a]     Process symbolic links as the link [absolute paths]
36    or      Rename files automatically37
37    ow      Save or restore file owner and group
38    p

  此处含有隐藏内容,需要正确输入密码后可见!

Set password 39 p- Do not query password 40 r Recurse subdirectories 41 sc<chr>[obj] Specify the character set 42 sl<size> Process files with size less than specified 43 sm<size> Process files with size more than specified 44 ta<date> Process files modified after <date> in YYYYMMDDHHMMSS format 45 tb<date> Process files modified before <date> in YYYYMMDDHHMMSS format 46 tn<time> Process files newer than <time> 47 to<time> Process files older than <time> 48 ts[m|c|a] Save or restore file time (modification, creation, access) 49 u Update files 50 v List all volumes 51 ver[n] File version control 52 vp Pause before each volume 53 x<file> Exclude specified file 54 x@ Read file names to exclude from stdin 55 x@<list> Exclude files listed in specified list file 56 y Assume Yes on all queries

其余解压缩命令:

1、*.tar 用 tar –xvf 解压
2、*.gz 用 gzip - d 或者 gunzip 解压 
3、*.tar.gz 和 *.tgz 用 tar –xzf 解压 
4、*.bz2 用 bzip2 - d 或者用 bunzip2 解压 
5、*.tar.bz2 用 tar –xjf 解压 
6、*.Z 用 uncompress 解压 
7、*.tar.Z 用 tar –xZf 解压 
8、*.rar 用 unrar e 解压 
9、*.zip 用 unzip 解压 

正文完
 0