1. Trang chủ
  2. » Công Nghệ Thông Tin

Module Linux essentials - Module 7: Archiving and compression

10 69 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 65,56 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Module Linux essentials - Module 6 guide archive files on the command line. This module include content: Archiving vs. compression, uses of archiving and compression, lossless vs lossy compression, gzip vs bzip2, using gzip/gunzip/bzip2/bunzip2,...

Trang 1

Module 7 Archiving and Compression

Trang 2

Exam Objective 3.1 Archiving Files on the

Command Line

Objective Summary

and directories

Trang 3

Archiving and Compression

Trang 4

Archiving vs Compression

• Archiving collapses multiple files into one

• Compression makes a file smaller

smaller code

files or entire directory trees

Trang 5

Uses of Archiving and

Compression

• Managing log files

• Sharing groups of files

• Compressing for more efficient transfer

• Keep like files together grouped by time

Trang 6

This slide deck is for LPI Academy instructors to use for lectures for LPI Academy courses

©Copyright Network Development Group 2013

Lossless vs Lossy Compression

Lossless:

• Decompressed file

is the same as the

original

• Doesn’t compress

as well as lossy

• For data you want

to preserve

• Logs, documents,

binaries,

configuration

Lossy:

• Decompressed file might have lost

information from the original

• Drops

“unimportant”

information from the file to make it compress better

• Images, sound,

Trang 7

This slide deck is for LPI Academy instructors to use for lectures for LPI Academy courses

gzip vs bzip2

• gzip and gunzip

• Uses Lempel-Ziv

coding

• Lossless

compression, good

efficiency

• Bzip2 and bunzip2

• Burrows-Wheeler block sorting

• Lossless compression, slightly more efficient than gzip, but requires more CPU

Trang 8

Using gzip/gunzip/bzip2/bunzip2

gzip foo # removes foo; creates foo.gz gunzip foo.gz # removes foo.gz; creates foo gunzip –l foo.gz # shows statistics

bzip2 foo # removes foo; creates foo.bz2 bunzip2 foo.bz2

bunzip2 –l foo.bz2 # DOESN’T EXIST!

Trang 9

Tape Archive - TAR

tar –cf foo.tar * # create

tar –tf foo.tar # show info

tar –xf foo.tar # extract

tar –czf foo.tgz * # gzip

tar –xjf foo.tbz # bunzip2

Trang 10

zip output.zip file1 file2 file3

zip foo.zip file.doc # One file

zip –r foo.zip Documents # recurse

unzip –l foo.zip # show contents

unzip foo.zip # extract all

unzip foo.zip file1 # just file 1

unzip foo.zip Documents/projectA/*

# everything under Documents/projectA

Ngày đăng: 30/01/2020, 04:01

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN