• Herramientas Online
  • - Calculadoras
    • Contador de caracteres
  • - Descarga
    • Descarga de TikTok
    • Descarga de DouYin
  • - Herramientas web
    • BASE64
    • Base64 a imagen
    • Imagen a Base64
    • Codificación URL
    • JavaScript
    • Timestamp
    • Convertidor Unicode
    • Formato JSON
    • Modificar extensión
    • Crear lista
    • Optimizador CSS
  • - Herramientas de cifrado
    • Cifrado MD5
    • Generador aleatorio
  • - Herramientas de imagen
    • Compresión de imágenes
    • Generador de código QR
    • Lector de código QR
    • Vista previa de fondo
  • - Hojas de información
    • Herencia de grupo sanguíneo
    • Tallas de ropa
  • [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

Otras Herramientas
  • Contador de caracteres Descarga de TikTok Descarga de DouYin BASE64 Base64 a imagen Imagen a Base64 Codificación URL JavaScript Timestamp Convertidor Unicode Formato JSON Modificar extensión Crear lista Optimizador CSS Cifrado MD5 Generador aleatorio Compresión de imágenes Generador de código QR Lector de código QR Vista previa de fondo Herencia de grupo sanguíneo Tallas de ropa
  • ブームなぜ起きた? 東京国立近代美術館で「ハニワと土偶の近代」展
    2024-05-30

    日テレ、意思疎通できず信頼喪失 「セクシー田中さん」の調査結果
    2024-05-31

    白と黒で奏でるインスタレーション 渡辺信子が京都で「White and Black」
    2024-05-31

    古本屋を巡り、顧みられなくなった作品、作家を生き返らせた九大大学院教授没後20年 教え子や研究仲間を支える「清新な光景」
    2024-05-30

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

    幸田文の名言「台所に立てば、…」【本と名言365】
    2024-05-30

    入試問題は白黒です 「わかりやすさ」「カラフル」は逆効果、自分で図を書くべし 桜井信一の攻める中学受験
    2024-05-31

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

    【光る君へ】平安時代、強烈なエピソードで知られた2人の受領とは
    2024-06-01

    あらゆる知識に精通した「天才」が教えてくれた、頭を良くするための新書の読み方と「究極のインプット・アウトプット」の方法
    2024-06-02

    エリザベートコンクールで吉田さん6位入賞
    2024-06-01

    「工芸的美しさの行方―うつわ・包み・装飾」が東京と京都で開催。第1弾はBONDED GALLERYにて7月から
    2024-06-03

    IT国家の最先端研究を知って 奈良・宇陀市がエストニアへの短期留学事業
    2024-06-04

    写真家たちは強大な権力の抑圧にどう抗ったのか。バルト三国の写真家に焦点を当てる展覧会をレポート
    2024-06-04

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

    東京都写真美術館で「今森光彦 にっぽんの里山」が開催へ
    2024-06-04

    横山奈美の個展「広い空に / Big Sky Mind」がN&A Art SITEで開催へ
    2024-06-05

    第55回星雲賞・自由部門に「巨大ロボット展」 日本SFファングループ連合会議
    2024-06-05

    「安全だと誰も言わない万博」爆発事故で教職員組合 大阪府に子供無料招待中止申し入れ
    2024-06-04

    藤井八冠、5連覇へ白星発進 将棋棋聖戦、山崎八段破る
    2024-06-06

    ©  Dopu Box
    💛