html5-img
1 / 10

Module 7 Archiving and Compression

Module 7 Archiving and Compression. Exam Objective 3.1 Archiving Files on the Command Line. Objective Summary Using archiving and compression with files and directories. Archiving and Compression. Archiving vs. Compression. Archiving collapses multiple files into one

aman
Télécharger la présentation

Module 7 Archiving and Compression

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Module 7Archiving and Compression

  2. Exam Objective3.1 Archiving Files on the Command Line Objective Summary • Using archiving and compression with files and directories

  3. Archiving and Compression

  4. Archiving vs. Compression • Archiving collapses multiple files into one • A few files or multiple directories • Compression makes a file smaller • Remove redundant information, replace with a smaller code • Can be applied to individual files, groups of files or entire directory trees

  5. Uses of Archiving and Compression • Managing log files • Sharing groups of files • Project documents • Source code • Compressing for more efficient transfer • Less data to send over the Internet or to tape • Keep like files together grouped by time • Backups

  6. Lossless vsLossy 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, movies

  7. gzipvs 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 • Used almost identically as gzip

  8. Using gzip/gunzip/bzip2/bunzip2 gzip foo # removes foo; creates foo.gz gunzipfoo.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!

  9. Tape Archive - TAR tar –cffoo.tar * # create tar –tffoo.tar # show info tar –xffoo.tar # extract tar –czffoo.tgz * # gzip tar –xjffoo.tbz # bunzip2 tar –xffoo.tar home/joe # only extract home/joe

  10. ZIP zip output.zip file1 file2 file3 zip foo.zipfile.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

More Related