刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第1页
刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第2页
刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第3页
刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第4页
刘庠宏林合治编着国立高雄大学应用数学系2005年3月1日.ppt_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

,劉庠宏、林合治編著 國立高雄大學應用數學系 2005年3月1日,如何利用本系Linux 主機群編譯與執行程式,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),2,What are the “Number Machines (NMs)”?,.tw .tw,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),3,How to log in the NMs?,Host Name: .tw User Name: Same as 高大應數學習資源網 user name Default password: redhat,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),4,How to log in the NMs? (cont.),利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),5,How to log in the NMs? (cont.),New File transfer windows,terminal windows,New terminal/file transfer windows,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),6,The Secure Shell Client (SSH) terminal windows view,Editing windows,Status bar,Menu,Mouse-enabled scroll bar,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),7,The file transfer windows view,files on number machine,Status bar,Files on your computer,Menu,Mouse-enabled scroll bar,Message of transfer,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),8,How to upload/download files to/from the NMs?,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),9,Basic Linux commands,顯示目前的目錄: pwd 顯示檔案內容,如超過一頁則暫停 : more (檔案名稱) Ex: more hello.c 更改密碼:yppasswd(passwd) 變換目錄:cd Ex: cd math (到math這個目錄),利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),10,Basic Linux commands (cont.),到根目錄: cd / 建立一個新目錄: mkdir Ex: mkdir math (建立math這個目錄) 刪除一個空目錄:rmdir Ex: rmdir math (刪除math這個目錄),利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),11,Basic Linux commands (cont.),列出資料夾檔案: ls 複製檔案: cp (來源檔) (目的地) Ex: cp hello.c math (複製hello.c到math資料夾) 刪除檔案:rm (檔名) Ex: rm hello.c (刪除hello.c),利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),12,Basic Linux commands (cont.),查詢指令用法: man (指令名稱) 按q離開 到上一層目錄: cd ,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),13,How to edit codes by Emacs?,啟動 emacs: emacs 結束 emacs: Ctrl-x Ctrl-c 取消執行: Ctrl-g 開啟新檔案: Ctrl-x Ctrl-f 輸入檔名 例如: Ctrl-x Ctrl-f hello.c 刪除游標目前指的/後面的字: Ctrl-d 存檔: Ctrl-s,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),14,Source code,#include -我是標頭檔 int main() /- 主程式碼區塊 /- return 0; ,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),15,動手寫程式吧,程式目的:列印出 “hello!world!” 的字樣,#include int main() Return 0; ,Printf(“Hello! World!n”);,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),16,程式說明,Printf(“列印出字樣”); :列印出字樣 Printf(“n”); :換下一行,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),17,編譯程式與執行程式,C Language: b45_chadfive b45_chad$ gcc hello.c -o hello b45_chadfive b45_chad$ ./hello Hello! World! 執行結果 C+ Language: b45_chadfive b45_chad$ g+ hello.cpp o hello b45_chadfive b45_chad$ ./hello Hello! World! 執行結果,利用本系Linux主機編譯程式,高大應數課程講義 (2005/3),18,編譯程式與執行程式(計時),C Language: b45_chadfive b45_ch

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论