1 / 6

檔案壓縮

檔案壓縮. 壓縮是經由清除重覆的部分 , 而降低檔案所佔的空間,和降低網路檔案傳輸所需的時間 兩種基本的壓縮的方式 lossy lossless. compress Lempel-Ziv 壓縮技術 原檔名 .Z 看內容 zcat 刪除掉舊的檔案 解壓縮 uncompress 在二進位檔有較佳效果. 顯示過程 compress – v file1 壓縮 dir1 目錄 compress –r dir1 解壓 compress – d file1.Z 將檔案壓縮後另存新檔 ( 不可用於目錄 )

clio
Download Presentation

檔案壓縮

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. 檔案壓縮 • 壓縮是經由清除重覆的部分,而降低檔案所佔的空間,和降低網路檔案傳輸所需的時間 • 兩種基本的壓縮的方式 • lossy • lossless

  2. compress Lempel-Ziv壓縮技術 原檔名.Z 看內容zcat 刪除掉舊的檔案 解壓縮uncompress 在二進位檔有較佳效果 顯示過程 compress –v file1 壓縮dir1目錄 compress –r dir1 解壓 compress –d file1.Z 將檔案壓縮後另存新檔(不可用於目錄) compress –c file1 > file1.Z 節省空間

  3. c (create),建立 v(verbose),列印 t(table of content),表列 x(extract),抽取 f(file) Backup to tape tar cvf /dve/rmt0 /usr/bin Restore from tape tar xvf /dev/rmt0 Tar收集檔案

  4. Tar收集檔案 • Backup to a file tar -cvf letters.tra *.ltr • View tar file tar –tvf letters.tar • Extra one file tar -xvf letters.tar sam1.ltr • Extra files tar -xvf letters.tar

  5. 收集整個目錄 cd fromdir; tar cf - . | (cd todir; tar xpf -) • The tar command uses the next argument as the name of the archive instead of /dev/rmtnh. • If the name of the file is - (dash), tar writes to standard output or reads from standard input, whichever is appropriate. • Thus, tar can be used as the head or tail of a filter chain. tar cvf - . |(cd ../../users/gordon;tar xvf -)

  6. cd fromdir; tar cf - . | (cd todir; tar xpf -) standard I/O Preserve files to therir original modes

More Related