bzcat
View compressed bzip2 files
SYNOPSIS
bzcat [options] [filename(s)]
PARAMETERS
-f, --force
Force overwrite of output files.
-h, --help
Display help message and exit.
-k, --keep
Keep (don't delete) input files during compression or decompression.
-L, --license
Display the bzip2 license.
-s, --small
Reduce memory usage (at the expense of decreased speed).
-z, --compress
Force compression, regardless of the command name or the file extension.
-d, --decompress, --uncompress
Force decompression, regardless of the command name.
-t, --test
Check integrity of the specified file(s), but don't actually decompress them.
-v, --verbose
Be verbose. Show the compression ratio for each file processed.
-q, --quiet
Suppress non-essential warning messages.
-V, --version
Display version information and exit.
[filename(s)]
The name(s) of the bzip2 compressed file(s) to decompress. If no file is specified, or if '-' is specified, reads from standard input.
DESCRIPTION
The bzcat
command is a utility in Unix-like operating systems used to decompress files compressed with the bzip2 algorithm. It reads files ending in .bz2
and writes the uncompressed output to standard output. This allows you to view the contents of a compressed file without creating an uncompressed copy on the disk. bzcat
is functionally equivalent to bzip2 -dc
(or bzip2 --decompress --stdout
). It is commonly used in scripts and pipelines where the output needs to be processed by other commands. It can process one or more bzip2 files and it automatically determines if they are bzip2 format before decompressing. If no files are specified, or if a file is specified as '-', it reads from standard input. It's also possible to concatenate decompressed files, for example when using wildcards.
EXIT STATUS
bzcat
exits with status 0 if all operations were successful. An exit status of 1 indicates an error occurred during compression, decompression, or integrity testing.
HISTORY
The bzcat
command is part of the bzip2 suite of programs, which was first released by Julian Seward. bzip2 offered a superior compression ratio compared to gzip, and it gained popularity for archiving and data transmission. bzcat
streamlines the decompression process by piping the output to standard output, making it easy to integrate into shell scripts. It's a standard utility on most Unix-like systems, providing a convenient way to access the content of bzip2-compressed files without saving the uncompressed data to disk.