Linux中解压rar文件具体方法

RAR是一种专利文件格式,用于数据压缩与归档打包,其主要优点是可以把文件压缩目标分割到多个文件,并且很容易从这样的分割的压缩文件解压出源文件。

image-20211017110557818

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 需要在命令所在的文件夹执行命令,或者把文件夹加入环境变量中。

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

  ~ unrar x [file]

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

  rar ./unrar

UNRAR 5.60 freeware      Copyright (c) 1993-2018 Alexander Roshal

Usage:     unrar  - -  
              


 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


 -             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      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       Additionally filter included files
 n@            Read additional filter masks from stdin
 n@      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[obj]  Specify the character set
 sl      Process files with size less than specified
 sm      Process files with size more than specified
 ta      Process files modified after  in YYYYMMDDHHMMSS format
 tb      Process files modified before  in YYYYMMDDHHMMSS format
 tn      Process files newer than
 to      Process files older than
 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       Exclude specified file
 x@            Read file names to exclude from stdin
 x@      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 解压

文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/219782.html<

(0)
运维的头像运维
上一篇2025-04-14 06:42
下一篇 2025-04-14 06:43

相关推荐

  • woothostingVPS测评,实测体验,woothostingVPS怎么样,woothostingVPS真实测评

    WooHosting VPS 在 2026 年的实测结论是:其基于 NVMe SSD 的优化架构在中小型电商场景下表现卓越,但在高并发抗 D 能力上略逊于顶级云厂商,适合追求性价比与 WordPress 深度优化的站长,而非对网络稳定性有极端要求的企业级用户,在 2026 年云计算市场格局重塑的背景下,针对Wo……

    2026-05-02
    0
  • 服务器测评,实测数据与性能表现,服务器性能怎么样,服务器测评

    2026 年服务器实测结论明确:在 AI 推理与高频交易场景下,搭载最新一代国产算力芯片或英伟达 H200 架构的机型,在 4K 视频渲染与万级并发处理中展现出 40% 以上的性能跃升,但需警惕地域性网络延迟对海外业务的影响,随着 2026 年企业数字化转型进入深水区,服务器选型已从单纯的“参数堆砌”转向“场景……

    2026-05-02
    0
  • HostBasticVPS测评靠谱吗?高防实测数据与性能表现如何

    HostBasticVPS 在 2026 年高防场景下表现优异,其抗 DDoS 能力实测可达 500Gbps 峰值,适合需要高可用性的游戏及电商业务,但价格略高于市场平均水平,适合预算充足且对稳定性有极致追求的用户,核心防护能力实测:数据背后的安全逻辑在 2026 年网络攻击日益复杂化的背景下,单纯依靠带宽堆砌……

    2026-05-02
    0
  • BigBoxHost美国服务器怎么样?美国服务器租用推荐

    BigBoxHost 美国服务器在 2026 年凭借超低延迟、独立 IP 资源及合规的金融级安全架构,依然是跨境电商与大流量企业部署海外业务的首选方案,其综合性价比在同等配置下优于主流竞品,核心优势与 2026 年市场定位在 2026 年全球数据中心竞争格局中,BigBoxHost 美国节点已不再是单纯的“廉价……

    2026-05-02
    0
  • BigBoxHost美国服务器怎么样,美国云服务器租用推荐

    BigBoxHost 美国服务器在 2026 年凭借 BGP 多线接入与高性价比,是中小外贸企业及跨境电商首选的海外托管方案,其核心优势在于低延迟与高稳定性,但需根据业务规模谨慎评估其扩展性,在 2026 年的全球云计算格局中,美国数据中心依然是连接全球流量的核心枢纽,对于寻求BigBoxHost 美国服务器价……

    2026-05-02
    0

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注