HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

rar — The RAR archiver. Supports multi-volume archives that can be optionally self-extracting. More inform

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecommandsupportsclimultirararchiver

Problem

How to use the rar command: The RAR archiver. Supports multi-volume archives that can be optionally self-extracting. More information: <https://manned.org/rar>.

Solution

rar — The RAR archiver. Supports multi-volume archives that can be optionally self-extracting. More information: <https://manned.org/rar>.

Archive 1 or more files:
rar a {{path/to/archive_name.rar}} {{path/to/file1 path/to/file2 path/to/file3 ...}}


Archive a directory:
rar a {{path/to/archive_name.rar}} {{path/to/directory}}


Split the archive into parts of equal size (50M):
rar a -v{{50M}} -R {{path/to/archive_name.rar}} {{path/to/file_or_directory}}


Password protect the resulting archive:
rar a -p{{password}} {{path/to/archive_name.rar}} {{path/to/file_or_directory}}


Encrypt file data and headers with password:
rar a -hp{{password}} {{path/to/archive_name.rar}} {{path/to/file_or_directory}}


Use a specific compression level (0-5):
rar a -m{{compression_level}} {{path/to/archive_name.rar}} {{path/to/file_or_directory}}

Code Snippets

Archive 1 or more files

rar a {{path/to/archive_name.rar}} {{path/to/file1 path/to/file2 path/to/file3 ...}}

Archive a directory

rar a {{path/to/archive_name.rar}} {{path/to/directory}}

Split the archive into parts of equal size (50M)

rar a -v{{50M}} -R {{path/to/archive_name.rar}} {{path/to/file_or_directory}}

Password protect the resulting archive

rar a -p{{password}} {{path/to/archive_name.rar}} {{path/to/file_or_directory}}

Encrypt file data and headers with password

rar a -hp{{password}} {{path/to/archive_name.rar}} {{path/to/file_or_directory}}

Context

tldr-pages: common/rar

Revisions (0)

No revisions yet.