如何在Fedora 30/29上安装Unrar

如何在Fedora 30 / Fedora 29上安装unrar? Unrar是一个命令行工具,用于从rar档案中提取文件。出于未知原因,Fedora存储库中没有unrar软件包。

展开 软件包在RPM Fusion存储库中可用。 RPM Fusion提供了Fedora Project或Red Hat不想发行的软件。该软件可作为当前所有Fedora和Red Hat系统的预编译RPM提供。

步骤1:添加RPM Fusion存储库

在安装unrar之前,必须手动将RPM Fusion存储库添加到系统中。

Fedora 30:

sudo dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-30.noarch.rpm
sudo dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-30.noarch.rpm

Fedora 29:

sudo dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-29.noarch.rpm
sudo dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-29.noarch.rpm

添加它们之后,您可以在Fedora上安装unrar工具。

步骤2:在Fedora上安装unrar

使用dnf软件包管理器从RPM Fusion存储库在Fedora上安装unrar。

sudo dnf install -y unrar

在终端中输入unrar以测试安装并查看使用情况页面。

$ unrar        

UNRAR 5.71 beta 1 freeware      Copyright (c) 1993-2019 Alexander Roshal

Usage:     unrar  - -  
               <@listfiles...> 


  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
  [email protected]            Read additional filter masks from stdin
  [email protected]      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[mcao]   Process files modified after  YYYYMMDDHHMMSS date
  tb[mcao]   Process files modified before  YYYYMMDDHHMMSS date
  tn[mcao]   Process files newer than  time
  to[mcao]   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       Exclude specified file
  [email protected]            Read file names to exclude from stdin
  [email protected]      Exclude files listed in specified list file
  y             Assume Yes on all queries

测试unrar提取的文件的完整性。

$ unrar t myfile.rar

UNRAR 5.71 beta 1 freeware      Copyright (c) 1993-2019 Alexander Roshal


Testing archive myfile.rar

Testing     tut1.mp4                                                OK 
Testing     tut2.mp4                                                OK 
Testing     tut3.mp4                                                OK 
Testing     tut4.mp4                                                OK 
Testing     tut5.mp4                                                OK 
All OK

接下来,解压缩文件。

$ unrar e myfile.rar 

UNRAR 5.71 beta 1 freeware      Copyright (c) 1993-2019 Alexander Roshal


Extracting from proxycerts.rar

Extracting  tut1.mp4                                                  OK 
Extracting  tut2.mp4                                                  OK 
Extracting  tut3.mp4                                                  OK 
Extracting  tut4.mp4                                                  OK 
Extracting  tut5.mp4                                                  OK 
All OK

在Fedora系统上成功安装,测试并使用了unrar。查看博客上提供的其他Fedora指南。

在Fedora上安装Visual Studio代码

如何在Fedora上安装VirtualBox

如何在Fedora上安装Polybar状态栏

Sidebar