信息系统项目管理师_2024年软考学习应考交流_信息系统项目管理师考试

标题: Device-Independent Input and Output 与设备无关的输入输出 [打印本页]

作者: w3cstandard    时间: 2008-9-19 09:47
标题: Device-Independent Input and Output 与设备无关的输入输出
与设备无关的输入输出

对于UNIX程序,设备(例如打印机或终端)和磁盘文件都是作为文件出现的。当你给UNIX操作系统一个命令时,可以指挥操作系统把输出送到任何设备或文件上去,这种变更操作称为输出重定向。

用同样的方法,对在正常情况下终端的程序输入也可以重定向,使输入来自磁盘文件。在UNIX操作系统下,输入输出与设备无关,它们可以重定向到或来自任何一种适当的设备。

例如,cat实用程序通常用来在终端屏幕上显示文件的内容。输入cat命令时,可以将文件的内容输出到一个磁盘文件上而不是到终端上。

Device-Independent Input and Output

Devices(such as a printer or terminal)and disk files all appear as files to UNIX programs.When you give the UNIX operating system a command,you can instruct it to send the output to any one of several devices or files.This diversion is called output redirection.

In a similar manner,a program’s input that normally comes from a terminal can be redirected so that it comes from a disk file instead.Under the UNIX operating system,input and output are device -independent;they can be redirected to or from any appropriate device.

As an example,the cat utility normally displays the contents of a file on the terminal screen.When you enter a cat command,you can cause its output to go to a disk file instead of to the terminal.
作者: 不抓老鼠的猫    时间: 2011-7-5 15:47
(*^__^*) 嘻嘻……   
作者: jackywang    时间: 2011-7-9 15:32
先看看怎么样!  
作者: 流星    时间: 2011-7-9 15:32
哥最近喜欢上了顶贴,因为,如果帖子火了,那有哥的功劳。如果帖子被顶沉了....哥也会很有成就感...因为是哥搞沉的~~大家切记~不要迷恋哥~哥只是一个传说
作者: 蜗牛    时间: 2011-7-9 15:32
哈哈,看的人少,回一下  
作者: 烟的寂寞    时间: 2011-7-13 15:15
帮顶  
作者: aizhijia    时间: 2011-7-18 02:54
不错哦,顶起  
作者: ctdsb2011    时间: 2011-7-18 23:36
谢谢分享了!  
作者: aizhijia    时间: 2011-7-20 01:45
生命在于运动,升官在于活动,资金在于流动,朋友在于走动。  
作者: 土豆    时间: 2011-7-20 01:45
楼上的稍等啦  
作者: hasee    时间: 2011-7-20 01:45
回答了那么多,没有加分了,郁闷。。  
作者: guli    时间: 2011-7-23 15:50
不错,感谢楼主
作者: guli    时间: 2011-7-23 15:50
不错不错.,..我喜欢  
作者: c1532    时间: 2011-7-23 15:50
应该加分  
作者: hasee    时间: 2011-7-27 10:40
哈哈,顶你了哦.  
作者: 查无此人    时间: 2011-7-27 10:40
#无语  
作者: 绿茶    时间: 2011-7-27 10:40
厉害!强~~~~没的说了!  
作者: a12    时间: 2011-8-2 14:28
我的啦嘿嘿  
作者: e34    时间: 2011-8-2 14:28
嘿嘿  
作者: c1532    时间: 2011-8-6 03:52
回答了那么多,没有加分了,郁闷。。  
作者: z12    时间: 2011-8-6 03:52
哦...............  




欢迎光临 信息系统项目管理师_2024年软考学习应考交流_信息系统项目管理师考试 (http://bbs.tuandui.org.cn/) Powered by Discuz! X3.2