Linux 下解压 rar 文件的方法

 更新时间:2018年07月02日 10:27:59   作者:xuyaowen  
这篇文章主要介绍了Linux 下解压 rar 文件的方法,需要的朋友可以参考下

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

1. 下载

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

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

Downloads tar -xvf rarlinux-x64-5.6.0.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) 1993-2018 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 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 文件的方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

相关文章

  • 在 Linux 终端中查找域名 IP 地址的命令(五种方法)

    在 Linux 终端中查找域名 IP 地址的命令(五种方法)

    本教程介绍了如何在 Linux 终端验证域名或计算机名的 IP 地址。我们将教你如何有效使用这些命令在 Linux 终端中识别多个域的 IP 地址信息
    2019-12-12
  • linux下使用 du查看某个文件或目录占用磁盘空间的大小方法

    linux下使用 du查看某个文件或目录占用磁盘空间的大小方法

    下面小编就为大家带来一篇linux下使用 du查看某个文件或目录占用磁盘空间的大小方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
    2016-11-11
  • Ubuntu18.04安装vsftpd的实现代码

    Ubuntu18.04安装vsftpd的实现代码

    这篇文章主要介绍了Ubuntu18.04安装vsftpd的实现代码,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
    2019-12-12
  • Linux下远程连接MySQL数据库的方法

    Linux下远程连接MySQL数据库的方法

    本篇文章主要介绍了Linux下远程连接MySQL数据库的方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
    2017-06-06
  • Ubuntu14.04虚拟机安装(图文详解)

    Ubuntu14.04虚拟机安装(图文详解)

    本篇文章主要介绍了Ubuntu14.04虚拟机安装,每一步都有详细的图文解释,具有一定的参考价值,感兴趣的小伙伴们可以参考一下。
    2017-01-01
  • Apache服务器中.htaccess的基本配置总结

    Apache服务器中.htaccess的基本配置总结

    这篇文章主要介绍了Apache服务器中.htaccess的基本配置总结,可以很方便地实现一些权限分配等效果,需要的朋友可以参考下
    2015-07-07
  • ubuntu 16.04下不能启动Steam的解决方法

    ubuntu 16.04下不能启动Steam的解决方法

    这篇文章主要给大家介绍了关于在ubuntu 16.04下不能启动Steam的解决方法,文中介绍的非常详细,对大家具有一定的参考学习价值,需要的朋友们下面来一起看看吧。
    2017-06-06
  • 关闭selinux(防火墙)方法分享

    关闭selinux(防火墙)方法分享

    默认装完CentOS,Selinux是打开的,这个你基本都是需要关闭,查看当前selinux的状态后,就可以按以下方法关闭selnux了
    2014-03-03
  • Linux bzip2 命令的使用

    Linux bzip2 命令的使用

    这篇文章主要介绍了Linux bzip2 命令的使用,帮助大家更好的理解和使用Linux系统,感兴趣的朋友可以了解下
    2020-08-08
  • Apache 安装配置mod_pagespeed加速模块

    Apache 安装配置mod_pagespeed加速模块

    mod_pagespeed是谷歌发布的加速httpd的优化模块,通过自动优化代码、压缩传输内容、自动缓存加速http,支持Centos/Debian系统
    2014-09-09

最新评论