JIYIK CN >

Current Location:Home > Learning > OPERATING SYSTEM >

Open Rar Files in Linux

Author:JIYIK Last Updated:2025/04/06 Views:

rarA file, also known as Roshal Archive Compressed, is a type of compressed file that contains multiple files and directories. Special programs are used to access and extract rarthe contents of a file.

In this article, we will explain how to extract rarthe contents of a file in Linux.

The tools required to open files may not be installed in Linux rar. Let's explain how to install and use these tools for different distributions.

We can install the tool on Linux distributions using the following command unrar.

sudo pacman -S unrar
sudo apt-get install unrar
sudp dnf install unrar

Use unrar ethe command to open rarthe file. Type a directory name to extract the file contents to a different directory.

unrar e test.rar /tmp

We can see that all the contents in the compressed file have been extracted to the specified directory.

Unzip and extract

Using lthe -p parameter, you can list the contents of a file without extracting it.

unrar l test.rar

Unrar List

Using tthe parameter, we can test the integrity of the file contents.

unrar t test.rar

Decompression test

We can install the tool on Linux distributions using the following command p7zip.

sudo pacman -S p7zip
sudo apt-get install p7zip
sudo yum install p7zip

Use 7z ethe command to open rarthe file. If you want to extract the file contents to a different directory, use -othe flag with the directory name.

7z e test.rar -o/tmp

We can see that all the contents in the compressed file have been extracted to the specified directory.

p7zip decompression

Using lthe -p parameter, you can list the contents of a file without extracting it.

7z l test.rar

p7zip list

Using tthe parameter, we can test the integrity of the file contents.

7z t test.rar

p7zip test

For reprinting, please send an email to 1244347461@qq.com for approval. After obtaining the author's consent, kindly include the source as a link.

Article URL:

Related Articles

awk tutorial – 7 awk printing examples

Publish Date:2025/04/06 Views:118 Category:OPERATING SYSTEM

This is the first article in the new awk tutorial series. We will publish several articles on awk in the coming time, which will explain all the features of awk with practical examples. In this article, let's review the basic awk working me

Sed Tutorial: Advanced Sed Substitution Examples

Publish Date:2025/04/06 Views:80 Category:OPERATING SYSTEM

In this article, let's review some interesting workarounds using the "s" substitution command in sed with a few real-world examples. 1. sed replaces the delimiter As we discussed in our previous article, we can use different delimiters in s

Installing Python modules without root access

Publish Date:2025/04/06 Views:67 Category:OPERATING SYSTEM

Use --user the -p option to install Python modules without root access, for example pip install requests --user . --user The -p option installs the package in the user's home directory and helps resolve permission issues. $ pip install requ

How to run TypeScript files from the command line

Publish Date:2025/04/06 Views:54 Category:OPERATING SYSTEM

Run TypeScript files from the command line using the ts-node package, for example npx ts-node myDirectory/myFile.ts . ts-node The command will convert the TypeScript file to JavaScript and run the code in one step. This is the TypeScript fi

PBKDF2+HMAC Hash Conflict

Publish Date:2025/04/06 Views:55 Category:OPERATING SYSTEM

Cryptocurrency enthusiast Christian 'CodesInChaos' Winnerlein once wrote: plnlrtfpijpuhqylxbgqiiyipieyxvfsavzgxbbcfusqkozwpngsyejqlmjsytrmd and eBkXQTfuBqp'cTcarg* have the same PBKDF2-HMAC-SHA1 hash. This intrigued me, so I decided to find

How to create simple Mac applications from shell scripts

Publish Date:2025/04/06 Views:200 Category:OPERATING SYSTEM

Basically, a Mac application has a .app ./file extension, but it's not really a file - it's a package. We can view the contents of an application by navigating to it in the Finder, right-clicking it, and then selecting " Show Package Conten

Scan to Read All Tech Tutorials

Social Media
  • https://www.github.com/onmpw
  • qq:1244347461

Recommended

Tags

Scan the Code
Easier Access Tutorial