Linux - Module 7: Archiving and compression

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

pptx10 trang | Chia sẻ: nguyenlam99 | Lượt xem: 970 | Lượt tải: 0download
Bạn đang xem nội dung tài liệu Linux - Module 7: Archiving and compression, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
Module 7 Archiving and CompressionExam Objective 3.1 Archiving Files on the Command LineObjective SummaryUsing archiving and compression with files and directoriesArchiving and CompressionArchiving vs. CompressionArchiving collapses multiple files into oneA few files or multiple directoriesCompression makes a file smallerRemove redundant information, replace with a smaller codeCan be applied to individual files, groups of files or entire directory treesUses of Archiving and Compression Managing log filesSharing groups of filesProject documentsSource codeCompressing for more efficient transferLess data to send over the Internet or to tapeKeep like files together grouped by timeBackupsLossless vs Lossy CompressionLossless:Decompressed file is the same as the originalDoesn’t compress as well as lossyFor data you want to preserveLogs, documents, binaries, configurationLossy:Decompressed file might have lost information from the originalDrops “unimportant” information from the file to make it compress betterImages, sound, moviesgzip vs bzip2gzip and gunzipUses Lempel-Ziv codingLossless compression, good efficiencyBzip2 and bunzip2Burrows-Wheeler block sortingLossless compression, slightly more efficient than gzip, but requires more CPUUsed almost identically as gzipUsing gzip/gunzip/bzip2/bunzip2gzip foo # removes foo; creates foo.gzgunzip foo.gz # removes foo.gz; creates foogunzip –l foo.gz # shows statisticsbzip2 foo # removes foo; creates foo.bz2bunzip2 foo.bz2bunzip2 –l foo.bz2 # DOESN’T EXIST!Tape Archive - TARtar –cf foo.tar * # createtar –tf foo.tar # show infotar –xf foo.tar # extracttar –czf foo.tgz * # gziptar –xjf foo.tbz # bunzip2tar –xf foo.tar home/joe # only extract home/joeZIPzip output.zip file1 file2 file3zip foo.zip file.doc # One filezip –r foo.zip Documents # recurseunzip –l foo.zip # show contentsunzip foo.zip # extract allunzip foo.zip file1 # just file 1unzip foo.zip Documents/projectA/* # everything under Documents/projectA

Các file đính kèm theo tài liệu này:

  • pptxle_module_07_1757.pptx