bzip2

bzip2 とは、ファイルをBZIP2形式で圧縮するLinux/Unixコマンドである。gzip コマンドと比べて圧縮効率が高いのが特徴である。bzip2 と bunzip2 は実質的に同じプログラムであり、bzip2 コマンドで解凍したり、bunzip2 コマンドで圧縮することもできる。

概要

bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ...  ]
bzip2 [ -h|--help ]

オプション

以下に示すオプションを bzip2 コマンドに指定できる。

-c
圧縮結果をファイルではなく、標準出力へ出力する。 (POSIX)
--stdout
圧縮結果をファイルではなく、標準出力へ出力する。 (GNU)
-h
ヘルプ・メッセージを表示して、コマンドを終了する。 (POSIX)
$ bzip2 -h
bzip2, a block-sorting file compressor.  Version 1.0.8, 13-Jul-2019.

   usage: bzip2 [flags and input files in any order]

   -h --help           print this message
   -d --decompress     force decompression
   -z --compress       force compression
   -k --keep           keep (don't delete) input files
   -f --force          overwrite existing output files
   -t --test           test compressed file integrity
   -c --stdout         output to standard out
   -q --quiet          suppress noncritical error messages
   -v --verbose        be verbose (a 2nd -v gives more)
   -L --license        display software version & license
   -V --version        display software version & license
   -s --small          use less memory (at most 2500k)
   -1 .. -9            set block size to 100k .. 900k
   --fast              alias for -1
   --best              alias for -9

   If invoked as `bzip2', default action is to compress.
              as `bunzip2',  default action is to decompress.
              as `bzcat', default action is to decompress to stdout.

   If no file names are given, bzip2 compresses or decompresses
   from standard input to standard output.  You can combine
   short flags, so `-v -4' means the same as -v4 or -4v, &c.
--help
ヘルプ・メッセージを表示して、コマンドを終了する。 (GNU)

bunzip2

bzip2 とは、BZIP2形式で圧縮されたファイルを展開(解凍)するLinux/Unixコマンドである。 bzip2 と bunzip2 は実質的に同じプログラムであり、bzip2 コマンドで解凍したり、bunzip2 コマンドで圧縮することもできる。

bunzip2 [ -fkvsVL ] [ filenames ...  ]
bunzip2 [ -h|--help ]

以下に示すオプションを bunzip2 コマンドに指定できる。

-c
解凍結果をファイルではなく、標準出力へ出力する。 (POSIX)
--stdout
解凍結果をファイルではなく、標準出力へ出力する。 (GNU)
-h
ヘルプ・メッセージを表示して、コマンドを終了する。 (POSIX)
$ bunzip2 -h
bzip2, a block-sorting file compressor.  Version 1.0.8, 13-Jul-2019.

   usage: bzip2 [flags and input files in any order]

   -h --help           print this message
   -d --decompress     force decompression
   -z --compress       force compression
   -k --keep           keep (don't delete) input files
   -f --force          overwrite existing output files
   -t --test           test compressed file integrity
   -c --stdout         output to standard out
   -q --quiet          suppress noncritical error messages
   -v --verbose        be verbose (a 2nd -v gives more)
   -L --license        display software version & license
   -V --version        display software version & license
   -s --small          use less memory (at most 2500k)
   -1 .. -9            set block size to 100k .. 900k
   --fast              alias for -1
   --best              alias for -9

   If invoked as `bzip2', default action is to compress.
              as `bunzip2',  default action is to decompress.
              as `bzcat', default action is to decompress to stdout.

   If no file names are given, bzip2 compresses or decompresses
   from standard input to standard output.  You can combine
   short flags, so `-v -4' means the same as -v4 or -4v, &c.
--help
ヘルプ・メッセージを表示して、コマンドを終了する。 (GNU)

関連記事