- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
UNIX操作系统教学课件英文版第八章
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * For example, if you want to make the variables VAR1 and VAR2 available to the new shell: $ export VAR1 VAR2 [Return] ... Export VAR 1 and VAR2. $ export [Return] ....... Check which variables are exported. VAR1 VAR2 $_........... List of variables, then the prompt appears. ? $_ …… in Bourne Shell $ ksh …… enter Korn Shell $ bash …… enter Bourne again Shell. ? 8.6 Korn and Bourne again Shell (1) fork (2) wait (3) exec (4) exit They are all system calls. ? 8.7 Unix Process Management * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ sleep 120 ; echo I am awake! [Return] I am awake! The sleep command is executed, causes a two-minute delay, and then (after two minutes) the echo command is executed, and the string argument “I am awake!” is displayed on the screen. 8.4.1 Timing a Delay: The sleep Command ps (process status) command obtains the status of the active processes in the system in four columns. PID: the process ID number TTY: your terminal number that controls the process TIME: time duration (in seconds) that your process is running COMMAND: the name of the command 8.4.2 Displaying the PID:The ps Command The ps Command Output Format $ ps PID TTY TIME COMMAND 24059 tty11 0:05 sh 24259 tty11 0:02 ps $ _ When you log out, your background processes are terminated. The nohup command causes your background processes to be immune to terminating signals. You can always redirect the output of your background programs to specified files. 8.4.3 Keep On Running: The nohup Command $ nohup (sleep 120 ; echo job done) [Return] 12235 ........... Background job PID. $ [Ctrl-d] ........ Log out and wait a few minutes. login: david [Return]
文档评论(0)