answer_unix(all)

上传人:沈*** 文档编号:157308993 上传时间:2022-09-29 格式:DOC 页数:11 大小:140KB
收藏 版权申诉 举报 下载
answer_unix(all)_第1页
第1页 / 共11页
answer_unix(all)_第2页
第2页 / 共11页
answer_unix(all)_第3页
第3页 / 共11页
资源描述:

《answer_unix(all)》由会员分享,可在线阅读,更多相关《answer_unix(all)(11页珍藏版)》请在装配图网上搜索。

1、Chapter 21.What are the two major UNIX system versions?Answer: AT & T UNIX version V, Berkeley UNIX2.What is the kernel?Answer: the UINX kernel, also called the base operating system, is the layer that manages all the hardware-dependent functions. 3.What is a shell?Answer: shell is a powerful comman

2、d interpreter, which control the users interaction with UINX. 4.Briefly explain the virtual computer concept.Answer: Virtual compute is an execution environment that consists of a terminal for user interface and shared access to the other computer resources such as memory, disk drivers, CPU etc. UNI

3、X, a multiuser operating system is implemented as a collection fo virtual computers. To the users, it appears that each of them has his or her own private pseudocomputer. 10.Name some of the UNIX variants.Answer: Linux, Solaris, UnixWare.Chapter 37. What sort of information does the man command prov

4、ide?Answer: the man command provide detailed information about command usage and options.8. What is the general format of a UNIX command?Answer: the command line format:13. Name the different types if UNIX shells. What are the prompt signs for UNIX shells?Answer: Bourne Shell(the sign is $), Korn Sh

5、ell(the sign is $), C Shell(the sign is %), Bourne Again Shell(the sign is $).14. What are the shell commands?Answer: shell commands are part of the shell program, these built-in commands are recognized by the shell and are executed internally.15. What are the utility programs?Answer: utility progra

6、ms s are executable programs that the shell locates and executes.Chapter 44. Name the vi modesAnswer: command mode,text input mode5. Name the keys that place the vi editor in the text input modeAnswer: I,i,O,o,A,a7. Name the command that saves your files and quits the vi editor.Answer: :wq or ZZ8. N

7、ame the command that just saves your file and remains in the vi editor.Answer: :w9. Name the key that places the vi editor in the command modeAnswer:ESC10. Name the operator that deletes one line of text and the operator that deletes five lines of text.Answer: dd, 5dd11.Name the operator that delete

8、s a character and the operator that deletes 10 characters.Answer: x, 10x12. Name the key that repeats your most recent text change.Answer: .(dot)13. Name the key that moves the cursor position to the end of the current line.Answer: $14. Name the key that moves the cursor position forward one word.An

9、swer: w15. Name the cursor movement keys that move the cursor up, down, left, and right.Answer: k, j, h, l16. Name the key that appends the text you enter to the end of the current line.Answer: A17. Name the key that opens a line above the current line.Answer: O18. Name the key that opens a line bel

10、ow the current line.Answer: o19. Name the key that undoes the most recent changes.Answer: u20. Name the key that undoes all the changes on the current line.Answer: UChapter 55.Question Nbr.1234567891011121314Answerhjniklmadbefgc6. Absolute pathname: bRelative pathname: c dFilename: a e f7.a. rm file

11、nameb. rmdir filenamec. rm -i filenamed. lp filename or lpr filenamee. cancel print-request-idf. lpstat g. lp -d printer-name or lpr -p printer-nameh. lp -3 filenamei. lsj. ls -a ls - -allk. ls ll. cd cd $HOMEm. cd directory-namen. mkdir directory-nameo. mkdir -p directory-name/directory-namep. cd /

12、q. cat filenamer. cat filename filename9.filenameusergroupotherdrwxrwxrwx 11read- write-executeread- write-executeread- write-execute-rwxrw-rw- counterread- write-executeread- writeread- write-rw- dead.letterread- write-rw-rw-rw- enableread- writeread- writeread- write-rwxrwxrwx xyzread- write-execu

13、teread- write-executeread- write-execute-rwx- HELLOread- write-execute-rwx-x-x Memosread- write-executeexecuteexecuteChapter 61.vi -R xyz4.The vi editor uses nine buffers numbered from 1-9 to store text that is deleted or yanked during the editing job. Data stored in the buffers can be accessed by t

14、heir assigned numbers. Data in the first buffer holds the latest changes and each new change of text will be stored in buffer 1 and the content of all buffers will move down. The content of buffer number 9, if any, will be lost. (Section 6.4.1)6.a: ddb: dwc: yyd: ywe: d$f: z2yyg: zph: 2p9.The .exrc

15、file is used to tailor the vi environment. The commands and parameters that affect the vi environment, and you want to be available when using the vi editor, are typed in this file. The content of this file will be executed when vi is invoked.10.:!date 11.:r date 13.The vi editor recovery option is

16、-r that is used in a command line such as: vi -r filename14.You use the vi editor r option without filename to get the list of the files that were saved. The command line will be: vi -r 16.Question Nbr.123456789101112AnswerbkeidcjlfgahChapter 71.The , sign is for output redirection, and the , inode

17、remains the same cp file1 file2 = new inode is createdln file1 file2 = inode remains the same11.find / name filename exec rm ;12.tail filename(by default tail shows the last 10 lines)15.The more command. For example: more filename17.ls *end20.cp Aa*Zz KeepChapter 86.The set command.7.The unset comma

18、nd10.The & sign is the background operator. A command that is followed by the & sign is sent to the background for execution11.The kill command with the process ID of the background program you intend to terminate.13.The pip operator (vertical line | ) is a UNIX operator that directs the output of o

19、ne program to be the input to another.14.You use the nohup command. You begin the command line with nohup, and type the rest of the command line.15.The grep command16.You use the sleep command.17.The parenthesis. Example: $ (date ; who ; pwd )28.alias29.export variable -name, variable-name .31.ls |

20、tee filenameChapter 111.You can use the sh command or the shell script filename, if it is an executable file.2.The chmod command. For example chmod u+ x myshell changes the access code of myshell to the executable.4.The read command. For example read xyz reads from the keyboard and stores the input

21、in the xyz variable.8.Using the shell program (sh) options x and v.13.expr15.expr x * y18.chmod a=rwx xyz27.Each comment line starts with a # sign.Chapter 121.The trap command is used to change the process reaction to the signals it receives.4.The stty command8.stty saneChapter 138.The at command. E

22、xample: at 1530 Wed ; sort bigfile10.The tar command is used to archive files or transport files from one system to another. It copies a set of files into a single file that can be save on any disk media.11.The tarfile is a file created when the tar command is used.13.tar -t save.tarTerminal Session

23、Chapter 116.accept numbers passed from arguments on the command line,and sums them to display the #result.if $# = 0 thenecho Error! Please specify at least one number as arguments on command line.exit 0fisum=msg=n=for i in $ dolet n=n+1let sum=sum+iif $n -le 1 thenmsg=$ielsemsg=$msg+$ifidoneecho “$m

24、sg = $sum”9#Accept three numbers from from arguments on the command line and shows the largest one of #them if test $# = 3 then if test $1 -gt $2 -a $1 -gt $3 then echo The largest number is: $1 elif test $2 -gt $1 -a $2 -gt $3 then echo The largest number is: $2 else echo The largest number is: $3 fi elseecho “Error! Please specify three numbers as arguments on command line.”exit 0 fi echo Done! Chapter 1210See p377 figure 12.7

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

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!