學(xué)習(xí)h服務(wù)器培訓(xùn)u基礎(chǔ)_第1頁
學(xué)習(xí)h服務(wù)器培訓(xùn)u基礎(chǔ)_第2頁
學(xué)習(xí)h服務(wù)器培訓(xùn)u基礎(chǔ)_第3頁
學(xué)習(xí)h服務(wù)器培訓(xùn)u基礎(chǔ)_第4頁
學(xué)習(xí)h服務(wù)器培訓(xùn)u基礎(chǔ)_第5頁
已閱讀5頁,還剩33頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡介

1、What Is an Operating System? a5662O perati ngSystemU sersProgram sConsum ersD i sksM em oryCPUN etw orkPri ntersResourceslogin: user1 Log inPassword: e to HP-UX Login messagesErase is BackspaceKill is Ctrl-U$ date Do workFri Jul 1 11:03:42 EDT 1994$ other commands$ exit or +Log outlogin:ReturnCtrldR

2、eturnLogging In and Outa68920The Online ManualSyntax: man -k| X keyword | command in which X is the number of one of the manual sectionsExamples: $ man dateDisplay the date man page. $ man -k copyDisplay entries with keyword copy. $ man passwdDisplay the passwd man page-Section 1. $ man 4 passwdDisp

3、lay the passwd man page-Section 4. Use to view next page.Use to view next line.Use to quit the man command.qSpaceReturna6891Basic File System CommandspwdlscdfindmkdirrmdirDisplays the directory name of your current location in the hierarchy.Sees what files and directories are under the current direc

4、tory.Changes your location in the hierarchy to another directory.Finds files.Creates a directory.Removes a directory.a56634What Can We Do with Files?lscatmorelpcpmvmvlnrmLook at the characteristics of a fileLook at the contents of a fileLook at the contents of a file, one screenful at a timePrint a

5、fileMake a copy of a fileChange the name of a file or directoryMove a file to another directoryCreate another name for a fileRemove a filea56644File CharacteristicsFileTypePermissionsLinksOwnerGroupSizeTimestampName$ ls -l -rw-r-r- 1 user3 class 37 Jul 24 11:06 f1-rwxr-xr-x 1 user3 class 52 Jul 24 1

6、1:08 f2drwxr-xr-x 2 user3 class 1024 Jul 24 12:03 memoa6894cat Display the Contents of a FileSyntax: cat file.Concatenate and display the contents of file(s)Examples: $ cat remind Your mothers birthday is November 29. $ cat note remind TO: Mike Smith The meeting is scheduled for July 29. Your mother

7、s birthday is November 29. $ cat abc 1234 abc 1234a56646CTRL+Dmore Display the Contents of a FileSyntax:more filename.Display files one screen at a timeExample: $ more funfile . . . -funfile (20%)- Q or q Quit more One more line One more pagea56647ReturnSpacetail Display the End of a FileSyntax:tail

8、 -n filename. Display the end of file(s)Example: $ tail -1 note soon as it is available.a56648cp Copy FilesSyntax:cp -i file1 new_file Copy a filecp -i file file. dest_dir Copy files to a directorycp -r -i dir dir. dest_dir Copy directoriesExample: $ ls -F f1 f2* memo/ note remind $ cp f1 f1.copy $

9、ls -F f1 f1.copy f2* memo/ note remind $ cp note remind memo $ ls -F memo note reminda56653mv Move or Rename FilesSyntax:mv -i file new_file Rename a filemv -i file file. dest_dirMove files to a directorymv -i dir dir. dest_dir Rename or move directoriesExample: $ ls -F $ mv note remind memof1 f2* m

10、emo/ note remind $ ls -F$ mv f1 file1 file1 memo/$ ls -F $ls -F memofile1 f2* memo/ note remind file2* note remind$ mv f2 memo/file2 $ mv memo letters$ ls -F $ ls -F file1 memo/ note remind file1 letters/$ ls -F memo file2*a56654ln Link FilesExample:$ ls -l f1-rw-rw-r- 1 user3 class 37 Jul 24 11:06

11、f1$ ln f1 /home/user2/f1.link$ ls -l f1-rw-rw-r- 2 user3 class 37 Jul 24 11:06 f1$ ls -l /home/user2-rw-rw-r- 2 user3 class 37 Jul 24 11:06 f1.link$ ls -i f1 /home/user2/f1.link1789 f1 1789 /home/user2/f1.linkSyntax:ln file new_fileLink to a fileln file file . dest_dirLink files to a directory/homeu

12、ser3f1user2f1.linkYou are here.a65025This is a samplefile to be copied.rm Remove FilesSyntax: rm -if filename filename. Remove files rm -rif dirname filename. Remove directoriesExamples: $ ls -F f1 f2 fruit/ memo/ $ rm f1 $ ls -F f2 fruit/ memo/ $ rm -i f2 f2? .,DE LESCShi f tExt endcharCapsASDFGHZX

13、CVBNMJKLPOIUYTREWQTab!12#3$4%56&7*8(9)0D evi ceFi l e D escri ptor0 01 12 2keyboardterm i nalstdi nstdoutstderrFi l ea566137Input Redirection Any command that reads its input from stdin can have its input redirected to come from another file.Example: $ cat remind Your mothers birthday is Novembe

14、r 29 $ mail user3 and Any command that produces output to stdout can have its output redirected to another file.Examples:Create/Overwrite Create/Append$ date date.out$ ls ls.out$ date who.log$ who who.log$ cat cat.out$ ls who.loginput text hereCtrl+da566139Error Redirection 2 and 2Any command that p

15、roduces error messages to stderr can have those messages redirected to another file.Examples:$ cp 2 cp.errCreate/Overwrite$ cp 2 cp.errCreate/Append$ more cp.errUsage: cp -f|-i -p source_file target_file cp -f|-i -p source_file .target_directory cp -f|-i -p -R|-rsource_directory.target_directoryUsag

16、e: cp -f|-i -p source_file target_file cp -f|-i -p source_file . target_directory cp -f|-i -p -R|-r source_directory.target_directorya566140grep Pattern MatchingSyntax: grep -cinv -e pattern -e pattern file. grep -cinv -f patterns_list_file file.Examples: $ grep user /etc/passwd $ grep -v user /etc/

17、passwd $ grep -in -e like -e love funfile $ who whoson $ grep rob whoson a68910What Is vi? A screen-oriented text editor Included with most UNIX system distributions Command driven Categories of commands includeGeneral administrationCursor movementInsert textDelete textPaste textModify texta56673vi

18、Modes Command Mode keystrokes interpreted as commandsInitial mode when a vi session is startedESC puts you in command modevi commands ( i, a, o, etc.) not echoed to the screenex commands, prefixed with a colon ( : ), echoed to the screensearch commands ( / and ? ), echoed to the screenLast Line Mode

19、 ex and search inputsInput Mode vi input with keystrokes entered into the fileCom m andM odeLast Li neM odeInputM odeESCESCiaoIAO:/?ReturnReturna6283Cursor Control CommandsBackspacehSpaceljkthe qui ck brow n foxwwwthe qui ck brow n fox2wthe qui ck brow n foxbbbthe qui ck brow n fox$the qui ck brow n

20、 foxa56678Cursor Control Commands (Continued)l i ne 1l i ne 2l i ne 3l i ne 4l i ne 5l i ne 6l i ne 7l i ne 8l i ne 9l i ne 10l ast l i ne of fi l e: 2goes to l i ne 22 GG8 GCtrl +gReports current l i ne num berRedraw s the screenCtrl + la56679Input Mode: i, a, O, oquik brown foxicESCquik brown foxa

21、cESCquik brown foxIThe spaceESCinput cappend cappend esinput TheA esESCOpen lineOcapopen lineolowerblank line aboveThe quick brown foxesblank line below* Remember!ESCwill conclude your input session.a6505Deleting Text: x, dw, dd, dGTheere are tooooo m any w orrdsx3xxThere are too m any w ordsdwThere

22、 are m any w ords2dwdd2dddGm any charactersm any w ordsm any l i nesm any pagesm any chaptersm any vol um esl ast l i ne of the fi l e*N ote:uUw i l l undo the l ast change.w i l l restore current l i ne to ori gi nal text.a56681Moving Text: p, Pthese are too w ordsthese are w ordsthese are w ords t

23、oohere i s one m roehere i s one m oehere i s one m oredwpxpdel ete w ordpaste afterxptransposes charactersl ow ercasel ow ercasea56682Moving Text: p, P (Continued)3ddl i ne 1l i ne 2l i ne 3l i ne 4l i ne 5l i ne 63 del ete l inesl i ne 1l i ne 5l i ne 6pl ow ercasepaste afterl i ne 1l i ne 5l i ne

24、 6l i ne 2l i ne 3l i ne 43ddl i ne 1l i ne 2l i ne 3l i ne 4l i ne 5l i ne 63 del ete l inesl i ne 1l i ne 5l i ne 6Shi ft- pPaste beforel i ne 1l i ne 5l i ne 2l i ne 3l i ne 4l i ne 6a56683Copying Text: yw, yythese are w ords tooywyank w ordthese are w ords tooppaste afterthese w ords are w ords

25、too3yy3 yank l inesl i ne 1l i ne 2l i ne 3l i ne 4l i ne 5l i ne 6l i ne 1l i ne 2l i ne 3l i ne 4l i ne 5l i ne 6ppaste afterl ow erl i ne 1l i ne 2l i ne 3l i ne 4l i ne 5l i ne 6l i ne 2l i ne 3l i ne 4a56684Changing Text: r, R, cw, .the qw i ck braw n foxrurorepl ace a characterthe qui ck brow

26、n foxcchange w ordwsi l ver- gray ESC the qui ck si l ver- gray foxcchange w ordwsl owESC the sl ow si l ver- gray foxbig Repl acebrand new textESC R(overstrike)the brand new textay fox* N ote: w i l l al l ow you to repeat your l ast change.a56685Searching for Text: /, n, NThere i s one hereand one

27、 m ore hereand yet one m orebut not thi s O N EO N Enor thi s O ne/ one / one nextprevi ousnNa56686Searching for Text PatternsoOld_text text text$ . character* .* Search for old_text and Old_text.Search for text at the beginning of a line.Search for text at the end of a line.Search for any single character.Search for zero or more occurrences of character.Search for zero or more occurrences of any char

溫馨提示

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

評論

0/150

提交評論