1 / 15

壓縮檔案

壓縮檔案. tar 打包指令. tar [ 參數 ] 檔名 檔案 / 目錄 檔案的打包與壓縮參數: 建立、解壓縮與查閱的參數: -c :建立壓縮檔案 -x :解開壓縮檔案 -t :查看 tarfile 裡面的檔案 其他參數: -v :查閱打包過程的資訊 -f file :指定壓縮為檔案. tar 範例. 將 /etc 目前打包後,存到 /root/ 目錄下 tar – cvf /root/etc.tar /etc 將 etc.tar 檔解壓縮到 / tmp 目錄下

delora
Télécharger la présentation

壓縮檔案

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. 壓縮檔案 檔案管理

  2. tar 打包指令 • tar [參數] 檔名 檔案/目錄 • 檔案的打包與壓縮參數: • 建立、解壓縮與查閱的參數: • -c:建立壓縮檔案 • -x:解開壓縮檔案 • -t :查看 tarfile裡面的檔案 • 其他參數: • -v :查閱打包過程的資訊 • -f file :指定壓縮為檔案 檔案管理

  3. tar 範例 • 將 /etc 目前打包後,存到 /root/ 目錄下 • tar –cvf /root/etc.tar /etc • 將 etc.tar 檔解壓縮到 /tmp目錄下 • tar –xvf/root/etc.tar –C /tmp 檔案管理

  4. 打包/壓縮檔案的副檔名 • *.Z compress 壓縮的檔案 • *.zip zip 壓縮的案 • *.bz2 bzip2 壓縮的檔案 • *.gz gzip 程式壓縮的檔案 • *.tar tar 打包多個檔案(沒有壓縮) • *.tar.gz tar 打包多個檔案,並使用 gzip 的壓縮 • *.tgz • *.tar.bz2 tar 打包多個檔案,並使用 bzip 的壓縮 檔案管理

  5. 練習 • 將kitty中的某些檔案(自訂)壓縮成tar的壓縮檔,並放置在test/project.tar 下 • 將其解壓縮 檔案管理

  6. 程式撰寫 • 使用Java語言程式架構 • 開啟新的test.java檔 • picotest.java • 程式架構 • //印出hello字串

  7. 程序與排程

  8. 程序 • 程序:每個執行的工作都擁有一個程序 • 程序啟動時,會給序唯一的編號:「PID」

  9. 程式與程序的不同 • 程式:在實體磁碟中的個體,等待使用者去觸發 • 程序:在記憶體中的個體,為正在運作中的程式

  10. 範例: • 問:為何大家登入都是使用/bin/bash,卻不會互相干擾? • 一個program可被同時觸發多次,彼此間不會互相干擾,因為PID並不相同。

  11. 程序的管理(1) • ps(Process Status):檢視目前系統中,有哪些程序正在執行,以及它們的執行狀況為何。

  12. 程序的管理(2) • S(Status) • 代表這個程序的狀態 (STATE),主要的狀態有: • R (Running):該程式正在運作中。 • S (Sleep):開程式目前正在睡眠狀態(idle),但可以被喚醒。 • D :不可被喚醒的睡眠狀態,通常這支程式可能在等待 I/O 的情況(ex:列印)。 • T :停止狀態(stop),可能是在除錯 (traced) 狀態。 • Z (Zombie):僵屍狀態,程序已經終止但卻無法被移除至記憶體外。

  13. 程序動態顯示(1) • 持續偵測程序運作的狀態

  14. 程序動態顯示(2)

  15. 用程式了解thread • 一個行程有許多的thread public class ThreadExample1 extends Thread { public void run() { // override Thread's run() System.out.println("Here is the starting point of Thread."); for (inti=1;i<=10;i++) { System.out.println("User Created Thread"); } } public static void main(String[] argv) { Thread t = new ThreadExample1(); // 產生Thread物件 t.start(); // 開始執行t.run() for (int j=1;j<=5;j++) { System.out.println("Main Thread"); yield(); } } } 檔案管理

More Related