• オンラインツール
  • - 計算機
    • 文字数カウント
  • - ダウンロード
    • TikTok ダウンロード
    • Douyin ダウンロード
  • - Webツール
    • BASE64
    • Base64→画像
    • 画像→Base64
    • URLエンコード
    • JavaScript
    • タイムスタンプ
    • ユニコード変換
    • JSON整形
    • 拡張子変更
    • リスト作成
    • CSS最適化
  • - 暗号化ツール
    • MD5暗号化
    • ランダムジェネレーター
  • - 画像ツール
    • 画像圧縮
    • QRコードジェネレーター
    • QRコードリーダー
    • 壁紙プレビュー
  • - 情報シート
    • 血液型遺伝
    • 服のサイズ
  • [email protected]
DopuBox
  • English
  • Español
  • Français
  • 日本語
  • 한국어
  • 简体中文
  • 繁體中文
全部 ニュース Meta Code 文化・アート
Linuxでのファイルの圧縮と解凍コマンドの操作例の概要
2022-02-19

圧縮とは、従来のファイルを異なる符号化技術で演算し、データ記憶に必要な空間を減らし、使用前に解凍復元ソースファイルの内容を再利用すればよい。

Windowsと同様にlinuxでも圧縮と解凍の方法がいくつかあります。 1、zip圧縮と解凍
コードのコピー
xiaopeng@ubuntu:~/test$ zip
Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
Zip 2.32 (June 19th 2006). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
The default action is to add or replace zipfile entries from list, which
can include the special name - to compress standard input.
If zipfile and list are omitted, zip compresses stdin to stdout.
-f freshen: only changed files -u update: only changed or new files
-d delete entries in zipfile -m move into zipfile (delete files)
-r recurse into directories -j junk (don't record) directory names
-0 store only -l convert LF to CR LF (-ll CR LF to LF)
-1 compress faster -9 compress better
-q quiet operation -v verbose operation/print version info
-c add one-line comments -z add zipfile comment
-@ read names from stdin -o make zipfile as old as latest entry
-x exclude the following names -i include only the following names
-F fix zipfile (-FF try harder) -D do not add directory entries
-A adjust self-extracting exe -J junk zipfile prefix (unzipsfx)
-T test zipfile integrity -X eXclude eXtra file attributes
-y store symbolic links as the link instead of the referenced file
-R PKZIP recursion (see manual)
-e encrypt -n don't compress these suffixes
コードのコピー
xiaopeng@ubuntu:~/test$ ls -lh
コードのコピー
-rw-r--r-- 1 xiaopeng xiaopeng 212 2009-06-25 14:13 test1
-rw-r--r-- 1 xiaopeng xiaopeng 1.3K 2009-06-25 14:13 test2
-rw-r--r-- 1 xiaopeng xiaopeng 3.4K 2009-06-25 14:14 test3
-rw-r--r-- 1 xiaopeng xiaopeng 9.9K 2009-06-25 14:14 test4
コードのコピー
xiaopeng@ubuntu:~/test$ zip test.zip test*
コードのコピー
xiaopeng@ubuntu:~/test$ ls -lh
コードのコピー

-rw-r--r-- 1 xiaopeng xiaopeng 212 2009-06-25 14:13 test1

-rw-r--r-- 1 xiaopeng xiaopeng 1.3K 2009-06-25 14:13 test2
-rw-r--r-- 1 xiaopeng xiaopeng 3.4K 2009-06-25 14:14 test3
-rw-r--r-- 1 xiaopeng xiaopeng 9.9K 2009-06-25 14:14 test4
-rw-r--r-- 1 xiaopeng xiaopeng 5.0K 2009-06-25 14:17 test.zip
xiaopeng@ubuntu:~/test$
コードのコピー
xiaopeng@ubuntu:~/test$ ls -lh
コードのコピー
-rw-r--r-- 1 xiaopeng xiaopeng 212 2009-06-25 14:13 test1 -rw-r--r-- 1 xiaopeng xiaopeng 1.3K 2009-06-25 14:13 test2
-rw-r--r-- 1 xiaopeng xiaopeng 3.4K 2009-06-25 14:14 test3
-rw-r--r-- 1 xiaopeng xiaopeng 9.9K 2009-06-25 14:14 test4
xiaopeng@ubuntu:~/test$ zip -m test.zip test*パラメータ付き-m
updating: test1 (deflated 30%)
updating: test2 (deflated 65%)
updating: test3 (deflated 64%)
updating: test4 (deflated 73%)
xiaopeng@ubuntu:~/test$ ls -lh
コードのコピー
-rw-r--r-- 1 xiaopeng xiaopeng 5.0K 2009-06-25 14:26 test.zip
xiaopeng@ubuntu:~/test$
コードのコピー
xiaopeng@ubuntu:~/test$ ls -lh
コードのコピー
drwxr-xr-x 2 xiaopeng xiaopeng 4.0K 2009-06-25 14:31 pdf
-rw-r--r-- 1 xiaopeng xiaopeng 212 2009-06-25 14:13 test1
-rw-r--r-- 1 xiaopeng xiaopeng 1.3K 2009-06-25 14:13 test2
-rw-r--r-- 1 xiaopeng xiaopeng 3.4K 2009-06-25 14:14 test3
-rw-r--r-- 1 xiaopeng xiaopeng 9.9K 2009-06-25 14:14 test4

xiaopeng@ubuntu:~/test$ zip -r test.zip*は現在のディレクトリのすべての内容を圧縮し、rパラメータはpdfというサブディレクトリの内容も圧縮することを説明します。


ソース元URL:https://dopubox.com/article/p/9381e0d868a9c42a

その他のツール
  • 文字数カウント TikTok ダウンロード Douyin ダウンロード BASE64 Base64→画像 画像→Base64 URLエンコード JavaScript タイムスタンプ ユニコード変換 JSON整形 拡張子変更 リスト作成 CSS最適化 MD5暗号化 ランダムジェネレーター 画像圧縮 QRコードジェネレーター QRコードリーダー 壁紙プレビュー 血液型遺伝 服のサイズ
  • 藤子・F・不二雄の名言「ありそうもない話をありそうに描きたい」【本と名言365】
    2024-05-29

    一力が本因坊初防衛
    2024-05-30

    “ひばり”の愛称にふさわしい美しいメロディ。ハイドンの『弦楽四重奏曲第67番』【クラシック今日は何の日?】
    2024-05-30

    授業中の生徒や住民が弾道ミサイル飛来を想定した避難訓練 福島・須賀川桐陽高
    2024-05-31

    黒柳徹子さん、北京で特別授業 「日本語勉強続けて」
    2024-05-31

    小学館も来週に報告書公表
    2024-05-31

    むのたけじ賞、名称変更 「生前に障害者差別発言」
    2024-05-31

    まだ無名だった作曲家エルガーが、婚約の贈り物として捧げた名曲【クラシック今日は何の日?】
    2024-06-01

    日本の「木」の文化を家具を通して世界へ【ミラノデザインウィーク】
    2024-06-01

    映画「ゴジラ‐1.0」の震電は「コックピットだけ復元」のはずだった…山崎貴監督がエピソード披露
    2024-06-04

    「企画展 歌と物語の絵 ―雅やかなやまと絵の世界」(泉屋博古館東京)開幕レポート。歌、物語、絵画が織りなす芸術世界へ
    2024-06-04

    石川九楊の個展「石川九楊大全」が上野の森美術館で2ヶ月連続開催へ
    2024-06-05

    島左近の墓、京都の寺で発掘調査 三成の腹心、関ケ原後も生存?
    2024-06-05

    書評:「日本美術史」を書き換える100年単位の挑戦。『この国(近代日本)の芸術──〈日本美術史〉を脱帝国主義化する』
    2024-06-05

    美しくて“かわいい”結びの技  1400年の歴史を誇る「水引」の可能性を探って
    2024-06-06

    子供と行きたいおすすめ美術館【東京編】。子連れ、親子でアートを楽しもう!
    2024-06-06

    青森で来年夏に音楽祭 沖澤のどかさんが総監督
    2024-06-06

    写真家の吉田ルイ子さん死去 「ハーレムの熱い日々」
    2024-06-06

    「さどの島銀河芸術祭2024」が開催。新潟・佐渡島各所で作品を制作展示
    2024-06-06

    パートナーとの強い絆から生まれた、ベンジャミン・ブリテンの代表作【クラシック今日は何の日?】
    2024-06-06

    ©  Dopu Box
    💛