《操作系統(tǒng)原理與Linux》實驗一 Linux基本命令_第1頁
《操作系統(tǒng)原理與Linux》實驗一 Linux基本命令_第2頁
《操作系統(tǒng)原理與Linux》實驗一 Linux基本命令_第3頁
全文預(yù)覽已結(jié)束

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、操作系統(tǒng)原理與Linux實驗報告實驗名稱:實驗一 Linux基本命令的使用實驗日期: 2011-11-1班 級:b09511學(xué) 號:20094051141姓 名:郭峰祿計算機號:一、實驗?zāi)康?掌握Linux中文件操作基本命令使用方法。2掌握Linux中查看進程、內(nèi)存和磁盤情況基本命令的使用方法。二、實驗內(nèi)容1登錄Linux系統(tǒng)。 2用pwd命令顯示用戶登錄后所處的用戶主目錄。rootlocalhost # pwd/root 3用以下三個命令顯示用戶主目錄中的內(nèi)容,并比較命令之間的區(qū)別。 Ls rootlocalhost # ls b Desktop m partitioninfo studen

2、t1.c students.c b.c example_63.c Makefile student student.c usb.c current.c home m.c student1 studentsls a rootlocalhost # ls -a . .gconf .qt . .gconfd .realplayerrc .1.swp .gnome2 .recently-used .4.c.swp .gnome2_private .scim. ls -al rootlocalhost # ls -al 總用量 452 drwxr-x- 22 root root 4096 11月 1 1

3、6:19 . drwxr-xr-x 27 root root 4096 11月 1 16:17 . -rw- 1 root root 12288 3月 28 2011 .1.swp. 4在用戶主目錄中通過touch命令建立下列10個文件(例如:touch a): news_oct_a1news_oct_b2 news_oct_c3 news_dec_b3work_nov_a1 work_nov_b2 work_nov_c3mail_dev_a2 mail_oct_c3games_dec_b1rootlocalhost # touch news_oct_a1rootlocalhost # tou

4、ch news_oct_b2rootlocalhost # touch news_oct_c3rootlocalhost # touch news_oct_b3rootlocalhost # touch work_nov_a1rootlocalhost # touch work_nov_b2.rootlocalhost # touch mail_dev_a25使用ls 命令查看目錄,確認新建文件是否存在。rootlocalhost # ls news_oct_a1 news_oct_a1rootlocalhost # ls news_oct_a1 -al-rw-r-r- 1 root root

5、 0 11月 1 16:49 news_oct_a1.6通過ls l命令查看文件news_oct_al的權(quán)限,并將它的權(quán)限改為任何人都可以讀、寫和執(zhí)行。rootlocalhost # ls news_oct_a1 -l-rw-r-r- rootlocalhost # chmod 777 news_oct_a1 7通過mkdir命令在用戶主目錄中建立五個子目錄:reports、september、october、november和december。在reports子目錄中再建立三個子目錄:1、2、3。rootlocalhost # mkdir reports october november d

6、ecemberrootlocalhost # cd reportsrootlocalhost reports# mkdir 1 2 38將/etc/passwd文件復(fù)制到目錄1下并重命名為mypasswd,給mypasswd文件建立一個硬文件鏈接hardpass和一個軟文件鏈接softpass。查看mypasswd、hardpass和softpass三個文件的節(jié)點信息。rootlocalhost # cp /etc/passwd reports/1/mypasswdrootlocalhost # ln reports/1/mypasswd hardpassrootlocalhost # ln

7、-s reports/1/mypasswd softpass842843 hardpass 842843 reports/1/mypasswd 810910 softpass 9將用戶主目錄中含字符串“dec”且含字符"b"的文件移動到december子目錄下。 10將用戶主目錄中剩下含字符串“oct”和字符串“nov”的文件分別移動到相應(yīng)月份的子目錄中。 11刪除december子目錄及其中的文件。12使用ps命令查看系統(tǒng)中進程的運行情況。rootlocalhost # ps PID TTY TIME CMD 428 pts/0 00:00:00 bash 9476 pts/0 00:00:00 ps13使用free命令查看系統(tǒng)中內(nèi)存的使用情況。rootlocalhost # free total used free shared buffers cachedMem: 2074652 599008 1475644 0 25500 413168-/+ buffers/cache: 160340 1914312Swap: 0 0 014使用df命令查看系統(tǒng)中磁盤空間的使用情況。rootlocalhost # dfFilesystem 1K-塊 已用 可用 已用% 掛載點/dev/sda1 9912560 3928500 5472392 42% /n

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論