How To List and Unrar Rar Files In Ubuntu, Debian, Kali, Mint?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/list-unrar-rar-files-ubuntu-debian-kali-mint/
PINTEREST
PINTEREST
INSTAGRAM

Rar is very popular compression format used for different purposes. A lot of files like documents, image files, source code etc. are compressed using rar compression format. In this tutorial we will look how to install rar tool for Ubuntu, Debian, Kali and Mint and than list and extract files and directories.

Install Unrar

We will use apt package manager in order to install unrar package.

Install Unrar

Install Unrar

List Rar File Contents

We can list contents of a rar files with l option and the rar file name. In this example we will list contents of rar file named ans.rar .

List Rar File Contents

List Rar File Contents

The list operation will print attributes, size, date time and names.

Unrar All Files and Directories

We can use e option in order to extract all files and directories inside a rar file. In this example we will extract contents of ans.rar . -r is used to extract recursively which means all sub files and directories will be extracted too.

Unrar All Files and Directories

Unrar All Files and Directories

Unrar Single File or Directory

Some times we may need to extract only single file or directory from a rar file. This may be a backup rar file where we only need a single file or directory. We need to specify the file and directory path and name in relative manner. In this example we will extract file named data.txt

Or if the file is locate in the back/files directory we can use following command.

LEARN MORE  Linux tar Command and How To Tar A Directory

Preserve Directory Structure

While taking backups with rar command the absolute directory path can be stored into the rar file. This is useful for recover process where we do not need to specify the extract path explicitly. We can use x option inorder to preserve directory structure while extracting. We will use -r as recursive extract.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/list-unrar-rar-files-ubuntu-debian-kali-mint/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)