Forrest logo
back to the rar tool

rar:tldr:9a01c

rar: Use a specific compression level (0-5).
$ rar a -m${compression_level} ${path-to-archive_name-rar} ${filename_or_directory}
try on your machine

This command is used to create a RAR archive file with a specified compression level for a given file or directory. Here is a breakdown of each part of the command:

  • rar: This is the main command to create RAR archives using the RAR compression algorithm.

  • a: This is a subcommand of rar that stands for "add." It is used to add files or directories to an archive.

  • -m${compression_level}: This flag is used to specify the compression level for the archive. ${compression_level} is a placeholder that should be replaced with an actual compression level. RAR supports different compression levels (e.g., store, fast, normal, good, best) which determine the amount of compression applied to the files in the archive.

  • ${path-to-archive_name-rar}: This is the path (including the filename) where the RAR archive should be created. You need to replace ${path-to-archive_name-rar} with the actual path and name you want for the RAR file.

  • ${filename_or_directory}: This is the file or directory that you want to add to the RAR archive. You need to replace ${filename_or_directory} with the actual path and name of the file or directory you want to include in the archive.

To summarize, this command creates a RAR archive file with a specified compression level and includes a specified file or directory in the archive.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the rar tool