Forrest logo
back to the unar tool

unar:tldr:7ff9b

unar: Extract an archive to the specified directory.
$ unar -o ${path-to-directory} ${archive}
try on your machine

This command is used to extract the contents of an archive file (such as .zip or .rar) into a specified directory.

Here's a breakdown of the command:

  • "unar" is the name of a command line tool used for extracting archive files. It is similar to the "unzip" command, but supports a wider range of archive formats.
  • "-o" is an option that specifies the output directory where the extracted files should be placed.
  • "${path-to-directory}" is a placeholder for the actual path to the directory where you want the extracted files to be placed. You need to replace it with the desired directory path.
  • "${archive}" is a placeholder for the actual name of the archive file you want to extract. You also need to replace it with the name of the archive file.

For example, if you have a file called "archive.zip" and you want to extract its contents into a directory called "extracted", you would use the following command:

unar -o extracted archive.zip

After executing the command, the contents of the "archive.zip" file will be extracted and placed into the "extracted" directory.

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 unar tool