Skip to content

CLI reference

Every command, argument, option and default of the arca binary.

Last updated

ZIP, 7z, TAR (plain, gzip and XZ), standalone XZ and RAR are enabled by default. RAR supports list, test and extract, including -p for encrypted data or headers, and create for new single-volume RAR5 archives. Modifying an existing RAR or CBR, and creating CBR, is always rejected.

Output
Fast, safe archiverUsage: arca <COMMAND>Commands:  create    Create an archive                                          [aliases: c]  list      List the contents without extracting them                  [aliases: l]  extract   Extract the contents                                       [aliases: x]  test      Check integrity without writing to disk                    [aliases: t]  password  Add, change or remove the password of an existing archive  bench     Measure the R1 and R2 performance requirementsOptions:  -h, --help     Print help  -V, --version  Print version

list, extract and test also read the ZIP containers (.apk, .jar, .epub, .cbz and the rest), ISO 9660 images and, in builds with RAR, .rar and .cbr. Those are read-only: password refuses them and create refuses every one of them except new .rar archives.

create · c

Create an archive. The format is taken from the extension of the output file.

Argument / optionDefaultDescription
<OUT>requiredOutput archive: .zip, .7z, .rar, .tar, .tar.gz (or .tgz), .tar.xz (or .txz), .xz. An .xz takes exactly one file.
<INPUTS>...requiredFiles or directories to include.
-l, --level <LEVEL>normalstore · fast · normal · best.
-c, --codec <CODEC>autoauto · store · deflate · zstd · lzma2. auto uses Deflate in .zip, LZMA2 in .7z, .xz and .tar.xz and the RAR compressor in .rar (auto or store only).
-j, --threads <N>0ZIP and XZ threads; 0 means every core. XZ uses as many as fit in 2 GiB. 7z and RAR creation is sequential; .rar refuses N above 1.
-p, --password <PASSWORD>noneEncrypt with AES-256 (.zip, .7z). Other tools will ask for it to open the archive. Refused for .rar.
--hide-namesoff7z only: encrypt headers; requires a nonempty password.

list · l

List the contents without extracting them.

Argument / optionDefaultDescription
<ARCHIVE>requiredArchive to read.
-t, --timeoffReport how long it took (on standard error).
-p, --password <PASSWORD>nonePassword for encrypted 7z headers; not needed for visible names.

extract · x

Extract the contents.

Argument / optionDefaultDescription
<ARCHIVE>requiredArchive to extract.
-o, --dest <DEST>.Destination directory.
--on-conflict <POLICY>overwriteoverwrite · skip · rename. What to do when the file is already there.
-j, --threads <N>0Threads to use. 0 means every core. Only .zip can go parallel.
-p, --password <PASSWORD>nonePassword of an encrypted archive (AES-256 or ZipCrypto).

test · t

Check integrity without writing to disk.

Argument / optionDefaultDescription
<ARCHIVE>requiredArchive to check.
-p, --password <PASSWORD>nonePassword of an encrypted archive (AES-256 or ZipCrypto).

password

Rewrite a .zip with a different password, or with none. Entries aren’t compressed again, because WinZip AES encrypts the already-compressed bytes.

7z password changes and archive mutation are unsupported. See Creating archives for codec restrictions and empty-only encryption.

Argument / optionDefaultDescription
<ARCHIVE>requiredArchive to rewrite (.zip).
-p, --password <PASSWORD>noneCurrent password, if the archive has one.
--new <NEW>noneNew password. Leave it out to remove the encryption.
-o, --out <PATH>in placeWrite here instead of replacing the archive in place.

bench

Measure the R1 and R2 performance requirements against an archive.

Argument / optionDefaultDescription
<ARCHIVE>requiredArchive to measure against.

Exit status

StatusMeaning
0Success.
1Archive/I/O error, including wrong password or corrupted encrypted data. Printed to standard error as arca: <message>.
2Invalid command-line syntax/options, reported by the argument parser.