下載本文檔
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、西安郵電大學(xué)(計(jì)算機(jī)學(xué)院)課內(nèi)實(shí)驗(yàn)報(bào)告實(shí)驗(yàn)名稱:常用命令使用專業(yè)名稱:計(jì)算機(jī)科學(xué)與技術(shù)班 級(jí):計(jì)科1405學(xué)生姓名:高宏偉學(xué)號(hào)(8 位)J04141152指導(dǎo)教師:劉霞林實(shí)驗(yàn)日期:2017年04月07日實(shí)驗(yàn)?zāi)康?. 掌握Linux 一般命令格式。2. 掌握有關(guān)文件和目錄操作的常用命令。3. 掌握有關(guān)進(jìn)程操作的常用命令。4. 掌握使用man 命令。實(shí)驗(yàn)內(nèi)容1. 正確地登錄和退出系統(tǒng)。2. 熟悉 date,cal,who,echo,clear,passwd 命令。3. 在用戶主目錄下對(duì)文件進(jìn)行如下操作:復(fù)制一個(gè)文件、顯示文件內(nèi)容、查找指定內(nèi)容、排序、文件比較、文件刪除等。4. 對(duì)目錄進(jìn)行管理:創(chuàng)建
2、和刪除子目錄、改變和顯示工作目錄、列出和更改文件權(quán)限、鏈接文件等。5. 利用 man 顯示 date, echo 等命令的手冊(cè)頁(yè)6. 顯示系統(tǒng)中的進(jìn)程信息。實(shí)驗(yàn)步驟1. 登錄進(jìn)入系統(tǒng),修改個(gè)人密碼。2. 使用簡(jiǎn)單命令:date,cal,who,echo,clear等,了解Linux命令格式。3. 瀏覽文件系統(tǒng):1) 運(yùn)行 pwd 命令,確定當(dāng)前工作目錄。2)運(yùn)行l(wèi)s T命令,理解各字段含義。3)運(yùn)行l(wèi)s句命令,理解各字段含義。4) 使用 cd 命令,將工作目錄改到根目錄(/)上。運(yùn)行l(wèi)s T命令,了解各目錄的作用。5) 直接使用cd,回到哪里了?用 pwd驗(yàn)證。6) 用 mkdir 建立一個(gè)子
3、目錄subdir。7) 將工作目錄改到subdir。4. 文件操作1) 驗(yàn)證當(dāng)前工作目錄在subdir。2) 運(yùn)行 date>file1 ,然后運(yùn)行cat file1 ,看到什么信息?3) 運(yùn)行cat subdir,會(huì)有什么結(jié)果?為什么?4) 利用 man 命令顯示date 命令的使用說(shuō)明。5) 運(yùn)行man date>>file1 ,看到什么?運(yùn)行cat file1 ,看到什么?6)利用ls T filel , 了解鏈接計(jì)數(shù)是多少?運(yùn)行l(wèi)n file1 ./fa再運(yùn)行l(wèi)s T file1 ,看到鏈接計(jì)數(shù)有無(wú)變化?用 cat命令顯示fa 文件內(nèi)容。7) 顯示 file1 的前
4、10 行,后 10 行。8) 運(yùn)行cp file1 file2 ,然后ls T,看到什么? 運(yùn)行mv file2 file3 ,然后ls T,看到什么? 運(yùn)行 cat f* ,結(jié)果怎樣?9) 運(yùn)行rm file3 ,然后ls T,結(jié)果如何?10) 在 /etc/passwd 文件中查找適合你的注冊(cè)名的行。11)運(yùn)行l(wèi)s T,理解各文件的權(quán)限是什么?12) 用兩種方式改變file1 的權(quán)限。13)統(tǒng)計(jì)filel文件的行數(shù)、字?jǐn)?shù)。14)運(yùn)行 man ls|more ,顯示結(jié)果是什么?運(yùn)行cat -2叩ee file5 ,結(jié)果如何?運(yùn)行cat ,結(jié)果如何?四、 實(shí)驗(yàn)截圖1 .修改個(gè)人密碼。£
5、;=aJselcbgubuntupasswdChanging password for selab.(current) UNIX password: tnter neiw UNIX password: Retype new UNIX password: Bad: new password is too stnple Enter "% UNIX passard: Retype new UNIX password:pas5wd; password updated successfully 5E*lnhubuntu :HILibrenfhre impress2 .使用簡(jiǎn)單命令。O T se
6、lab尊ubuntu:一seltubuntu:daterri Apr 7 14:54:04 CST JG17&elabubuhtu: $ caL April 2617Su Ma Tu Ue Th Fr Sa 123456089 10111213141516 171819202122工3 24ZSZb272329302917-04-eT 1:35 (;0) 2017-&4-07 14:49 (:1) 2017 &4 07 14i5G (:1)12 ihellfl worlds«labtubuntu:*$ ,hoguest-tkiPtv ;e與 elab113el
7、abpts/6selabfdubLhtu:echo123Sul4宛ubuntu:5 echo hell口 wdtLd3.瀏覽文件系統(tǒng)3eiab(ffiubbhtu:-welab電ubuntupud /hDne/selablabubuntuLm-1total 44drwAt*xr-x 2 seLdbseLdb 4496Aug 102015Desktopdrwjtr-xr-a 2 LbAug 102015Docurientsdritnr -xr-x 2與vl3b 4696Sep 72015Downloddf-rw*r-r- 1煲lab 096#Aug MM5exdnpls.debktopdrwxr
8、 xr-)i 2scldbAug Jfl2015Mu51tdrwxr-xr-n 2我T自bAu? 3。2015Picturesdrwwr-xr-x 2 s«lbseUb 的98AU9泗2015Publicdrwxr - xr -)c 2 sclhscUbAug訓(xùn)2915TCPIplatESdrwxr wr -)c 2qfUb 4096Aug JO;(H5vidtos»1 b bubuntu: Is-ji424S96 .424E19.dnirc424592,proflf393217 .532752Documents532763Public4;4&n ,hfish hi
9、story 5B257BDorni -Loads53269$Templates4245S3 bash logout424591exdnples.desktop 532755Videos424594 +b«hrc535381.ggnf424541+ Xauthori.ty532759 cache424547.ICEauthority4Z40B5xinputre925G73 .conpiz5327(55.Iq5*1424514sessiQOerrQrs*53275& .config927B31.HQiiVLa42455»sessionerrors.old124543 .
10、dbu$532753 1Mu“c532570 Desktop5 能 754PicturesSldb9ijbuntu|向 It W3 H:56sei Kubuntu: /$clearboot/initrd439bMIS2015usrruot root root root root root mot ruat root root root root root439 439(5boot cdrofl20152815root root rnot root root root rootroot root root root root roo t root root root root roo L roo
11、t rootselat)(lubunrLi: /hone/selab "ImbQuhuntu: 一 $ selab0ubuntu:/$4096 163Qq40964896409620152015Z3152014Z015etc hone initrdroot root root root root root roo t23152015201Sdrwr drw r drwxr4日ge 46964226122004396losttfaund n«dtaproc rootrun s bindrwxrwxrht drirfAF -xi -xqclchubuntu:/? selabQu
12、buntu:/$ totl 92 drwxr-xr-x 2 drwwr-xr -n 3 drwwrwxr-x 2 drirfxr -xr -* ic drwwr-xr-x 136 drwxr-xr-x 3 Lrwx rwxrwx 1 25-genericdrwiir -xr -x 23 drwx2drwxr-xr-x 4 drwxr-xr-x 2 drwxr-xr-x 2quit)4.文件操作Manual pdge date(1) line 1 (pre5sWU Ml !0 4" !rhl”“ ii,* lab 座 ubuntu15;O2stlabubuntu:*ysubdirSDA
13、It(l)DATL(l)printtineFORMATmardatorys hortoptionsSTFHNG,nonITTNESPECJafi01=TIM£PF£seldbubuntu,T sUbS)ubuntu:-S /hone/selabs爛】abJubunLu:-S seLabfubuntu:nkdljr subdl cd lubdLr8601 fornat.User coma nd sldb>ubuntu: -/tubdircat ftlel2817 cat subdtr ,le or directorygndat 口y argumentSYNOPSIS d
14、ateoutput date/tlne tn only (thp default)ulab ubuntu:、/subd lr$ /hoM p / wldb" u bdtr elabtubuntu: /subdlrS »1« ubunt u: */subd I rffile=DATi-F| F tike -dat* Qncetire to the IndicatedOPTION+FORMAT1lu L -utcl - UrriYE與石 I HHOOhhnmF KC YV J Tssj JDESCRIPTIONDisplaydate-STRINGdisplay tin
15、e號(hào)noFILEdLrplny thr last rindifiefttion timrbnt nutest '與eton pceelston.selabubuntu: /subdtrS cat: subdir: N。5uch f ubuntu: */sulbdi r$scuouncu: */suDairselabubuntu:-$ cd subdtrselabubuntu:*/subdtr$ selabubuntu:*/subdtr$ selabubuntu:*/subdir$ DATE clearnan catdate»ftlel fileluser connandsDA
16、TE(l)NAME date-print orsetthe system date and timeSYNOPSIS date dateOPTION. tFORMAT-u| - utc| - - universal KJiDDhhmCCYY .ssDESCRIPTIONDisplay the current tine in the given FORMAT, or set the systemMandatory arguments to long options are mandatory for short too.d. -ddtC=STRINGdisplay tine described
17、by STRINGt not "now一二 selabfubuntu: * selabeubuntu:-S cd subdtrselabubuntu:*/subdir$ selabubuntu:"/subdtr$ selabubuntu:*/subdtr$ DATE(l)NAME dateprtnt ordate.optionsclearnan catsetSYNOPSIS date datedate»ftlei ftleluser comandsthe system date and tineOPTION. "FORMATu| - -utc| - -u
18、niversal MMDDhhninCCYY.ssJDESCRIPTIONDisplay the current tine in the given FORMAT, or set the systemMandatory arguments to long options are mandatory for short too.d. -date-STRiNGdisplay time described by STRIMG, not 'nowDATE(l)date.options,se(ab)ubuntu: */subdir selabubuntu:*/subdir$ head -10 f
19、ilelDATE(l)User ConnandsDATE(l)NAMEdate-print or set the system date and ttReSYNOPSIS date dateOPTION. 4FORMAT-u|-utc|-universal MMDDhhnnCCYY.ssselabubuntu:*/subdir$ tail -10 filel the info and date programs are properly installed at your site, the conmandinfo coreutils 'date invocation'shou
20、ld give you access to the complete manual.GNU coreutils 8.21 sclabubuntu:-/subdtr$ |January 2015DATE(l)selabubuntu:/subd什selabubuntu:/subdtr$ cp ftlei ftlez selabubuntu:/subdir$ Is -I total 16-rw-rw-r- 2 selab selab 6565 Apr 7 15:07-rw-rw-r- 1 selab selab 6565 Apr 7 15:14 selabubuntu:-/subdir$ mv fi
21、leZ file3 selabubuntu:/subdirs Is -I total 16-rw-rw-r- 2 selab selab 6565 Apr 7 15:67-rw-rw-r- 1 selab selab 6565 Apr 7 15:14 selabubuntu:/subdtr$filelftle2ftleifile3Q selab)ubur)tu: -/subdirselabubuntu:-/subdir$ rm file3selabubuntu:*/subdtr$ Is -1 total 8-rw-rw-r- 2 selab selab 6565 Apr 7 15:07 fil
22、el selabubuntu:-/subdtr$-More-C t5 G $elab$>ubuntu: /etcselab()ubuntu:/etc$ grep -F selab /etc/passwd:x:10e6:16O9:selr ,f:/hone/ claaj/bin/bash selabubuntu:/etc$trronwi tonrrarra iiuu i uuiiuselabubuntu:-/subdir$ chmod 0777 ftlel selabubuntu:/subdt$ chnod u=r,ug=x ftlelselab3ubuntu:-/subdirS wc -I ftlel 212 ftlel selabubuntu:-/subdtr$ wc -w ftlel 836 ftlelDESCRIPTIONList information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvsux nor -sort ts specified.Mandatory arguments to long options are mand
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度林業(yè)用地承包經(jīng)營(yíng)權(quán)租賃合同范本2篇
- 2025年化妝品原料質(zhì)量追溯體系建設(shè)合同3篇
- 綠色金融在氣候科技中的未來(lái)角色
- 2025年度環(huán)保產(chǎn)業(yè)園投資合作合同集錦3篇
- 2025年度女方離婚協(xié)議履行義務(wù)及違約賠償合同-@-1
- 課題申報(bào)參考:馬克思主義與儒釋道思想融創(chuàng)的哲學(xué)范式研究
- 2025年度個(gè)人二手車交易合同模板全新升級(jí)版
- 《短視頻編?。哼x題構(gòu)想+腳本制作+劇本策劃+鏡頭拍攝》課件匯 第1-5章 選題方向:從賬號(hào)定位出發(fā) - 了解劇本:創(chuàng)作優(yōu)劇本的基礎(chǔ)
- 黑龍江省高三上學(xué)期開(kāi)學(xué)考試語(yǔ)文試題(含答案)
- 二零二五版門(mén)衛(wèi)室節(jié)能環(huán)保改造合同4篇
- 新聞?dòng)浾咦C600道考試題-附標(biāo)準(zhǔn)答案
- 變壓器搬遷施工方案
- 單位轉(zhuǎn)賬個(gè)人合同模板
- 八年級(jí)語(yǔ)文下冊(cè) 成語(yǔ)故事 第十五課 諱疾忌醫(yī) 第六課時(shí) 口語(yǔ)交際教案 新教版(漢語(yǔ))
- 中考語(yǔ)文二輪復(fù)習(xí):記敘文閱讀物象的作用(含練習(xí)題及答案)
- 老年外科患者圍手術(shù)期營(yíng)養(yǎng)支持中國(guó)專家共識(shí)(2024版)
- 2024年1月高考適應(yīng)性測(cè)試“九省聯(lián)考”數(shù)學(xué) 試題(學(xué)生版+解析版)
- (正式版)JBT 11270-2024 立體倉(cāng)庫(kù)組合式鋼結(jié)構(gòu)貨架技術(shù)規(guī)范
- EPC項(xiàng)目采購(gòu)階段質(zhì)量保證措施
- T-NAHIEM 101-2023 急診科建設(shè)與設(shè)備配置標(biāo)準(zhǔn)
- 針灸與按摩綜合療法
評(píng)論
0/150
提交評(píng)論