Linux 圧縮、解凍
ナビゲーションに移動
検索に移動
目次
Linux 圧縮、解凍
zip圧縮
- $ zip -r foo.zip foo
zip コマンドを使ってディレクトリ以下をアーカイブする
パターンマッチで圧縮
- zip [圧縮後ファイル名] [ファイルパターン]
- # zip access-log202406.zip access_log*
- adding: access_log (deflated 94%)
- adding: access_log-20240609 (deflated 91%)
- adding: access_log-20240618 (deflated 92%)
- adding: access_log-20240623 (deflated 90%)
- adding: access_log-20240630 (deflated 90%)
.gzファイルを解凍する
- $ gzip -d firefox-1.5.0.6.tar.gz
.tarファイルを解凍する
- $ tar xvf firefox-1.5.0.6.tar
.tar.gzファイルを解凍する
- $ tar xzvf Django-1.0.2-final.tar.gz
.zipファイルを解凍する
- $ unzip -d outdir_name hoge.zip
エラー
zipで圧縮したものをgunzipで解凍しようとすると以下のエラー
- has more than one entry -- unchanged
<blockquote>zipはunzipで解凍、gzはgunzipで解凍</blockquote>
{{include_html banner_html, "!Linux"}}
© 2006 矢木浩人