网上下载rar 压缩文件的使用,在linux在我们需要对其进行解压缩,这个时候,我们需要安装 rar相关的文件,来进行解压缩。

1. 下载

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

2. 使用 tar 命令 解压 (*.tar 用 tar –xvf )

➜  Downloads tar -xvf rarlinux-x64-5.6..tar.gz 

3. 进入文件夹make (需要 管理员权限)

➜  rar cat makefile
###################################################################
# Installing RAR executables, configuration files and SFX modules #
# to appropriate directories #
################################################################### PREFIX=/usr/local install:
mkdir -p $(PREFIX)/bin
mkdir -p $(PREFIX)/lib
cp rar unrar $(PREFIX)/bin
cp rarfiles.lst /etc
cp default.sfx $(PREFIX)/lib%

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

3. 最后,可以使用 unrar 进行解压, 使用 rar 命令,进行压缩。

➜  ~ unrar x [file] 

我们 可以直接输入 unrar 查看帮助

➜  rar ./unrar 

UNRAR 5.60 freeware      Copyright (c) - Alexander Roshal

Usage:     unrar <command> -<switch > -<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 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> Additionally filter included files
n@ Read additional filter masks from stdin
n@<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 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] 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
x@ Read file names to exclude from stdin
x@<list> Exclude files listed in specified list file
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 解压

Linux 下解压 rar 文件的更多相关文章

  1. linux 下解压rar文件

    今天遇到要在linux 服务器上解压几个rar 文件的问题,rar似乎是win 专属的压缩格式,所以linux 原生工具链中并没有支持rar 解压的工具.经过一系列搜索确定了一个脚linuxrar 的 ...

  2. linux下解压rar文件

    由于,linux系统内置没有这个包需要,我们用源码,添加到系统 Linux下rar unrar的安装 以3.8.0版本为例,如果是64位平台,执行以下命令,也可以去官方网站:)下载最新版:wget h ...

  3. [转帖]Linux 下解压 rar 文件

    转至:https://www.cnblogs.com/jinanxiaolaohu/p/13824185.html https://www.cnblogs.com/xuyaowen/p/unrar_f ...

  4. linux下解压zip文件时,文件名乱码的解决(转载)

    转自:http://blog.sina.com.cn/s/blog_6261f8690101c1gx.html windows下的zip文件,在linux下解压时,经常会出现文件名乱码的情况. 主要原 ...

  5. Linux下解压分包文件zip(zip/z01/z02)【转】

    本文转载自:https://www.cnblogs.com/EasonJim/p/7227109.html?utm_source=itdadao&utm_medium=referral Lin ...

  6. linux下解压zip文件

    linux下解压zip文件 linux自带的unzip命令可以解压windows下的zip格式的压缩文件. unzip命令 语法:unzip [选项] 压缩文件名.zip 各选项的含义分别为: -x ...

  7. Linux解压rar文件

    Linux解压rar文件(unrar安装和使用,分卷解压) windows平台很多压缩文档为rar文件,那么怎么做到Linux解压rar文件(unrar安装和使用)? 简单,centos5安装unra ...

  8. Linux下解压rar格式的压缩文件

    如果需要在Linux系统下解压RAR格式的压缩包,需要安装Linux版本的rar程序. 具体安装步骤如下: wget http://www.rarlab.com/rar/rarlinux-3.8.0. ...

  9. [Linux] Ubuntu下解压rar文件的方法

    一般通过默认安装的ubuntu是不能解压rar文件的,只有在安装了rar解压工具之后,才可以解压.其实在ubuntu下安装rar解压工具是非常简单的,只需要两个步骤就可以迅速搞定. ubuntu 下r ...

随机推荐

  1. 观察者模式——java设计模式

    观察者模式 定义:观察者模式定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象.这个主题对象在状态上发生变化时,会通知所有观察者对象,使它们能够自动更新自己. 1.观察者模式的结构 ( ...

  2. 和我一起打造个简单搜索之ElasticSearch入门

    本文简单介绍了使用 Rest 接口,对 es 进行操作,更深入的学习,可以参考文末部分. 环境 本文以及后续 es 系列文章都基于 5.5.3 这个版本的 elasticsearch ,这个版本比较稳 ...

  3. linux下tar gz bz2 tgz z等众多压缩文件的压缩与解压方法

    Linux下最常用的打包程序就是tar了,使用tar程序打出来的包我们常称为tar包,tar包文件的命令通常都是以.tar结尾的.生成tar包后,就可以用其它的程序来进 行压缩了,所以首先就来讲讲ta ...

  4. 利用docker hub做中转拉取google的k8s镜像

    1.背景 部署kubernetes,需要FQ.但是在初始化的时候,即是FQ了有的镜像pull依然会超时,导致初始化失败.而你又不想使用国内的一些镜像源,因为更新不及时.很多新功能和插件都不会包括,只想 ...

  5. How to describe the wind sprial in computer system?

    How to describe the wind sprial in computer system? 2017-02-21 刘崇军 风螺旋线 If we want get the approval ...

  6. [转]Magento 2 and 1 Million Products

    本文转自:https://www.goivvy.com/blog/magento-2-1-million-products Can Magento 2 handle 1 million product ...

  7. 随机错乱排序(sort的应用)

    新手上路,大家多多指教哈,,, #include <iostream> #include <algorithm> #include <ctime> using na ...

  8. Mybatis一对一,一对多

    一对一 假如有student表(学生表)和student_card表(学生证表). student表中有一个字段self_card用来查student_card,student_card表中有一个st ...

  9. MYSQL一次千万级连表查询优化

    概述:交代一下背景,这算是一次项目经验吧,属于公司一个已上线平台的功能,这算是离职人员挖下的坑,随着数据越来越多,原本的SQL查询变得越来越慢,用户体验特别差,因此SQL优化任务交到了我手上. 这个S ...

  10. 消息推送SignalR简单实例

    消息推送SignalR:一个ASP .NET 下的类库,可以在ASP .NET 的Web项目中实现实时通信. 功能:当所连接的客户端变得可用时服务器代码可以立即向其推送内容,而不是让服务器等待客户端请 ...