manpagez: man pages & more
info lzip
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6 A small tutorial with examples

WARNING! Even if lzip is bug-free, other causes may result in a corrupt compressed file (bugs in the system libraries, memory errors, etc). Therefore, if the data you are going to compress is important, give the ‘--keep’ option to lzip and do not remove the original file until you verify the compressed file with a command like ‘lzip -cd file.lz | cmp file -’.


Example 1: Replace a regular file with its compressed version ‘file.lz’ and show the compression ratio.

lzip -v file

Example 2: Like example 1 but the created ‘file.lz’ is multi-member with a member size of 1 MiB. The compression ratio is not shown.

lzip -b 1MiB file

Example 3: Restore a regular file from its compressed version ‘file.lz’. If the operation is successful, ‘file.lz’ is removed.

lzip -d file.lz

Example 4: Verify the integrity of the compressed file ‘file.lz’ and show status.

lzip -tv file.lz

Example 5: Compress a whole floppy in /dev/fd0 and send the output to ‘file.lz’.

lzip -c /dev/fd0 > file.lz

Example 6: Decompress ‘file.lz’ partially until 10 KiB of decompressed data are produced.

lzip -cd file.lz | dd bs=1024 count=10

Example 7: Decompress ‘file.lz’ partially from decompressed byte 10000 to decompressed byte 15000 (5000 bytes are produced).

lzip -cd file.lz | dd bs=1000 skip=10 count=5

Example 8: Create a multivolume compressed tar archive with a volume size of 1440 KiB.

tar -c some_directory | lzip -S 1440KiB -o volume_name

Example 9: Extract a multivolume compressed tar archive.

lzip -cd volume_name*.lz | tar -xf -

Example 10: Create a multivolume compressed backup of a large database file with a volume size of 650 MB, where each volume is a multi-member file with a member size of 32 MiB.

lzip -b 32MiB -S 650MB big_db

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October 10, 2013 using texi2html 5.0.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.