| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

Linux 圧縮、解凍

提供: MyMemoWiki
ナビゲーションに移動 検索に移動

Linux 圧縮、解凍

zip圧縮

  1. $ zip -r foo.zip foo

zip コマンドを使ってディレクトリ以下をアーカイブする

パターンマッチで圧縮
  1. zip [圧縮後ファイル名] [ファイルパターン]
  2. # zip access-log202406.zip access_log*
  3. adding: access_log (deflated 94%)
  4. adding: access_log-20240609 (deflated 91%)
  5. adding: access_log-20240618 (deflated 92%)
  6. adding: access_log-20240623 (deflated 90%)
  7. adding: access_log-20240630 (deflated 90%)

.gzファイルを解凍する

  1. $ gzip -d firefox-1.5.0.6.tar.gz

.tarファイルを解凍する

  1. $ tar xvf firefox-1.5.0.6.tar

.tar.gzファイルを解凍する

  1. $ tar xzvf Django-1.0.2-final.tar.gz

.zipファイルを解凍する

  1. $ unzip -d outdir_name hoge.zip

エラー

zipで圧縮したものをgunzipで解凍しようとすると以下のエラー
  1. has more than one entry -- unchanged

<blockquote>zipはunzipで解凍、gzはgunzipで解凍</blockquote>


{{include_html banner_html, "!Linux"}}