$linuxjunkies
>

lzop(1)

lzop compresses or decompresses files using the LZO algorithm for fast compression/decompression.

UbuntuDebianFedoraArch

Synopsis

lzop [OPTION]... [FILE]...

Description

lzop is a file compressor that uses the LZO (Lempel-Ziv-Oberhumer) compression algorithm, offering very fast compression and decompression at the cost of lower compression ratios than gzip or bzip2. It's commonly used in scenarios where speed is more important than maximum compression, such as backup streams and real-time data compression.

By default, lzop compresses files in-place, removing the original and creating a .lzo file. When decompressing, it restores the original filename and removes the .lzo file.

Common options

FlagWhat it does
-d, --decompressdecompress files instead of compressing
-c, --stdoutwrite output to stdout, don't modify input files
-f, --forceoverwrite existing output files without prompting
-k, --keepkeep input files after compression (don't delete originals)
-1 to -9set compression level (1=fastest, 9=best compression; default is 3)
-l, --listlist the contents of compressed files
-t, --testtest integrity of compressed files
-v, --verboseverbose mode; show progress and file information
-q, --quietsuppress all messages and warnings
-n, --no-namedon't store original filename and timestamp in archive

Examples

compress myfile.txt to myfile.txt.lzo, removing the original

lzop myfile.txt

decompress myfile.txt.lzo back to myfile.txt

lzop -d myfile.txt.lzo

compress to stdout and redirect to a file, keeping the original

lzop -c largefile.iso > largefile.iso.lzo

compress all .log files with verbose output, keeping originals

lzop -k -v *.log

list contents and information about backup.lzo

lzop -l backup.lzo

test the integrity of backup.lzo without decompressing

lzop -t backup.lzo

compress a tar stream in real-time with lzop

tar c dir | lzop > dir.tar.lzo

compress with maximum compression level, keeping original file

lzop -9 -k largefile.bin

Related commands