• Online Tools
  • - Calculators
    • Character Count
  • - Download
    • TikTok Download
    • DouYin Download
  • - Web Tools
    • BASE64
    • Base64 to Image
    • Image to Base64
    • URL Encoding
    • JavaScript
    • Timestamp
    • Unicode Converter
    • JSON Format
    • Modify Extension
    • Make List
    • CSS Optimizer
  • - Encryption Tools
    • MD5 Encryption
    • Random Generator
  • - Image Tools
    • Image Compression
    • QR Code Generator
    • QR Code Reader
    • Wallpaper Preview
  • - Info Sheets
    • Blood Type Heredity
    • Clothing Sizes
  • [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

Other Tools
  • Character Count TikTok Download DouYin Download BASE64 Base64 to Image Image to Base64 URL Encoding JavaScript Timestamp Unicode Converter JSON Format Modify Extension Make List CSS Optimizer MD5 Encryption Random Generator Image Compression QR Code Generator QR Code Reader Wallpaper Preview Blood Type Heredity Clothing Sizes
  • 英国を代表する作曲家ブリテンが世界平和を願って作った『戦争レクイエム』【クラシック今日は何の日?】
    2024-05-29

    美術館の裏側を伝える展覧会「鎌倉別館40周年記念 てあて・まもり・のこす 神奈川県立近代美術館の保存修復」レポート
    2024-05-29

    かど番・藤井聡太、第4局始まる 将棋、叡王戦
    2024-05-30

    【6月1日~2日】週末必見の“アート&デザイン”まとめ!
    2024-06-01

    “家形埴輪”大集合、総選挙も 「住宅展示場の気分で」、奈良
    2024-06-01

    鎌倉幕府の地頭から海の武士団・松浦党に…古文書群「青方文書」からみる中世の漁業や製塩事情
    2024-06-01

    元アシスタントが語る Dr.スランプ「あのキャラ」の誕生秘話
    2024-06-01

    芸術レベルのグッズも登場! パリ・東京・大阪の名コレクションが集まる「TRIO展」
    2024-06-01

    応挙手本?に描いたトラ甦れ…徳島の寺のふすま絵修復へ
    2024-06-04

    千年後の未来へ 太宰府天満宮のふすま絵完成 日本画家神戸智行さん移住し10年かけ完成
    2024-06-04

    2025年春に「直島新美術館」が誕生。既存の活動から新しい価値創造を目指す
    2024-06-04

    彫刻の森美術館で「舟越桂 森へ行く日」が開催へ
    2024-06-05

    田名網敬一「TANAAMI!! AKATSUKA!! / 45 rpm」展、集英社マンガアートヘリテージ トーキョーギャラリーで開催
    2024-06-04

    「KOGEI Art Fair Kanazawa 2024」開催決定
    2024-06-04

    五木ひろし歌手生活60年…ふるさと福井へ恩返しの新曲
    2024-06-04

    安藤忠雄さん設計の美術館名称決まる…香川・直島に2025年オープン
    2024-06-05

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

    佐渡金山の世界遺産登録、「情報照会」勧告
    2024-06-06

    佐渡金山、世界遺産登録に向け「追加情報の提出」求められる
    2024-06-06

    ブリン・バン・バン・ボンが1位 ビルボード、上半期人気曲
    2024-06-06

    ©  Dopu Box
    💛