• 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
  • 「韓国版純烈」K4の「アダルトKポップ」 日本デビュー曲USEN1位も獲得 コアな追っかけも
    2024-05-30

    制作期間「足りていなかった可能性」
    2024-05-31

    藤井聡太八冠が勝ち、最終局へ 将棋叡王戦で2勝2敗
    2024-05-31

    「ねこクラゲ」被告、脱税認める 原稿優先で申告せず、福岡地裁
    2024-05-31

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

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

    三姉妹が温泉旅行で取っ組み合いの大げんか うっとうしくてめんどうくさい家族愛描く「お母さんが一緒」
    2024-06-02

    ジャスパー・モリソンの名言「…が「普通」のものより役にたつことはない。」【本と名言365】
    2024-06-03

    アルテミス計画&天の川銀河! 大人も学んで楽しめる「大人レゴ」最新ラインナップは”宇宙”がテーマ!
    2024-06-03

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

    稀代のピアニスト、マルタ・アルゲリッチの伝説の始まりはこの1曲から【クラシック今日は何の日?】
    2024-06-04

    「CLAMP展」が国立新美術館で7月より開催。展示数は史上最多の約800点
    2024-06-04

    「三島喜美代―未来への記憶」(練馬区美術館)開幕レポート。最大規模のインスタレーションも
    2024-06-05

    「台北當代2024」開幕レポート。「台湾マーケットのニーズに応えるプラットフォームに」
    2024-06-04

    田名網敬一が新作の巨大インスタレーションを発表へ。世界初の大規模回顧展「田名網敬一 記憶の冒険」
    2024-06-06

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

    写真家の吉田ルイ子さん死去
    2024-06-06

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

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

    アキナの山名さん骨折 毎日放送、ロケ中に転倒
    2024-06-06

    ©  Dopu Box
    💛