LinuxCommandLibrary

lrztar

Compress and transfer files to a remote system

TLDR

Archive a directory with tar, then compress

$ lrztar [path/to/directory]
copy

Same as above, with ZPAQ - extreme compression, but very slow
$ lrztar -z [path/to/directory]
copy

Specify the output file
$ lrztar -o [path/to/file] [path/to/directory]
copy

Override the number of processor threads to use
$ lrztar -p [8] [path/to/directory]
copy

Force overwriting of existing files
$ lrztar -f [path/to/directory]
copy

SYNOPSIS

lrztar [options] archive.tar.lrz file1 [file2 ...]

PARAMETERS

-c
    Create a new archive.

-x
    Extract files from an existing archive.

-v
    Verbose mode. Displays files as they are processed.

-f archive.tar.lrz
    Specifies the archive file name. Required for both creating and extracting.

-C directory
    Change to the specified directory before adding files to the archive or extracting files from the archive.

DESCRIPTION

The `lrztar` command is a convenience wrapper that combines the functionalities of `lrz` (Lempel-Ziv-Ross Williams compression) and `tar` (tape archiver) into a single command.

It allows you to create compressed archives of files and directories efficiently. It first packages the specified files and directories into a single archive using `tar`, and then compresses the resulting archive using `lrz`. This results in smaller file sizes compared to using `tar` alone, especially for compressible data. The command streamlines the archiving and compression process, making it easier to manage backups and transfer files.

It is typically used when high compression ratios are desired and the `lrz` algorithm is preferred or mandated. When dealing with large numbers of files, `lrztar` can significantly reduce storage space and bandwidth requirements.

CAVEATS

Because `lrztar` relies on both `tar` and `lrz`, both commands must be installed on the system.

The `.tar.lrz` extension is a common convention to indicate a `tar` archive compressed with `lrz`.

SEE ALSO

tar(1), lrz(1), gzip(1), bzip2(1), xz(1)

Copied to clipboard