• 온라인 도구
  • - 계산기
    • 문자 수
  • - 다운로드
    • TikTok 다운로드
    • DouYin 다운로드
  • - 웹 도구
    • 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 코드 리더 배경 화면 미리보기 혈액형 유전 의류 사이즈
  • レノンのギター4.5億円 ビートルズ関連最高落札額
    2024-05-30

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

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

    作曲家ビゼーの窮地を救った傑作オペラ『真珠採り』の聴きどころは?【クラシック今日は何の日?】
    2024-05-31

    デザインジャーナリストによる新しいデザイン誌の登場です!
    2024-06-01

    鳥取・大山でたいまつ行列 夏山開き前夜祭
    2024-06-01

    〈テロ事件と「美の復讐」〉15世紀末・イタリア「メディチ家兄弟暗殺計画」とルネサンスの画家たち
    2024-06-01

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

    小学館「作家の意向第一に協議」 映像化指針、ドラマ原作者死去で
    2024-06-03

    河合隼雄物語賞に八木詠美さん 学芸賞は湯沢規子さん
    2024-06-03

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

    美術評論家連盟が「ガザ戦争に対する意⾒表明」を公開
    2024-06-04

    GROUP「島をつくる | Planning Another Island」(マイナビアートスクエア)開幕レポート。高層ビルのなかで建築をコンポストする
    2024-06-05

    太宰府天満宮で「Fukuoka Art Book Fair」が開催へ
    2024-06-04

    お台場エリアを舞台に新芸術祭「東京お台場トリエンナーレ 2025」が誕生
    2024-06-05

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

    沙に囲まれた残酷な世界が私たちの社会を浮かび上がらせる。期待の作家が令和の世に送り出す、新たな青春のバイブル!
    2024-06-06

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

    もしあの時に戻れたら…歌人・穂村弘が話題書『迷子手帳』で明かす、今も忘れられない「失敗」
    2024-06-07

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

    ©  Dopu Box
    💛