fdfs的疑问`Windows系统 电脑资料

上传人:亦明 文档编号:143292809 上传时间:2020-08-28 格式:DOC 页数:11 大小:16.98KB
返回 下载 相关 举报
fdfs的疑问`Windows系统 电脑资料_第1页
第1页 / 共11页
fdfs的疑问`Windows系统 电脑资料_第2页
第2页 / 共11页
fdfs的疑问`Windows系统 电脑资料_第3页
第3页 / 共11页
fdfs的疑问`Windows系统 电脑资料_第4页
第4页 / 共11页
fdfs的疑问`Windows系统 电脑资料_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《fdfs的疑问`Windows系统 电脑资料》由会员分享,可在线阅读,更多相关《fdfs的疑问`Windows系统 电脑资料(11页珍藏版)》请在金锄头文库上搜索。

1、fdfs的疑问Windows系统 电脑资料 filedescriptor是个什么东西 举例说下 谢谢 iricyan 回复于:xx-11-19 23:42:13 0 1 2 红头发 回复于:xx-11-20 06:45:54 whut? 012? guchengman 回复于:xx-11-20 18:33:04 0是标准输出, 1是标准输入. 2是标准错误, 如:cat/etc/passw file descriptor是个什么东西 举例说下 谢谢 iricyan 回复于:xx-11-19 23:42:130 1 2 红头发 回复于:xx-11-20 06:45:54whut? 012? gu

2、chengman 回复于:xx-11-20 18:33:040是标准输出, 1是标准输入. 2是标准错误, 如: cat 其原理是利用输入重定向, 但其完整写法应该是: cat 0 ls -la.txt可以把ls命令保存到一个文件当中, 在这完整写法应该是 ls -l 1a.txt 当你运行ls -l /errdir 时会有错误提示, 我们可以用标准错误重定向来把错误提示保存到一个文件中或丢弃. ls -l /errdir 2/tmp/a.txt 把错误保存在/tmp/a.txt文件中. ls -l /errdir 2/dev/null 把错误提示丢弃,也即不显示. mmmmn 回复于:xx-

3、11-20 18:44:38真是开玩笑,文件句柄能是这东西? 红头发 回复于:xx-11-20 19:18:29谢谢我消化下 guchengman 回复于:xx-11-20 21:48:38quote:8544bbfcb5=mmmmn真是开玩笑,文件句柄能是这东西?/quote:8544bbfcb5 其实我也是有疑问, 但是在书上只是写了 1 2 3 之类的东东, 加上前者所说, 我就因此回复, 还请大侠出来分析一下. iricyan 回复于:xx-11-20 22:38:59ops: 写错了, laoxia 回复于:xx-11-21 06:40:17quote:af318e44a5=guch

4、engman0是标准输出, 1是标准输入. 2是标准错误, 如: cat 其原理是利用输入重定向, 但其完整写法应该是: cat 0 ls -la.txt可以把./quote:af318e44a5This is right. file descriptor 0, 1, 2 are not all of the descriptors. but they are the most monly used ones. laoxia 回复于:xx-11-21 06:49:50b:8ee48ac867Standard In, Standard Out, and Standard Error/b:8ee4

5、8ac867 When writing shell scripts, you can control input/output redirection. Input redirection is the ability to force a mand to read any necessary input from a file instead of from the keyboard. Output redirection is the ability to send the output from a mand into a file or pipe instead of to the s

6、creen. Each process created by a shell script begins with three color=red:8ee48ac867file descriptors/color:8ee48ac867 associated with it, as shown in Figure 16-1. These color=red:8ee48ac867file descriptors/color:8ee48ac867standard input, standard output, and standard errordetermine where input to th

7、e process es from, and where the output and error messages are sent. Standard input (STDIN) is always file descriptor 0. Standard input is the place where the shell looks for its input data. Usually data for standard input es from the keyboard. You can specify standard input to e from another source

8、 using input/output redirection. Standard output (STDOUT) is always color=red:8ee48ac867file descriptor/color:8ee48ac867 1. Standard output (default) is the place where the results of the execution of the program are sent. Usually, the results of program execution are displayed on the terminal scree

9、n. You can redirect standard output to a file, or suppress it pletely by redirecting it to /dev/null.Standard error (STDERR) is always color=red:8ee48ac867file descriptor /color:8ee48ac8672. Standard error is the place where error messages are sent as they are generated during mand processing. Usual

10、ly, error messages are displayed on the terminal screen. You can redirect standard error to a file, or suppress it pletely by redirecting it to /dev/null. You can use the color=red:8ee48ac867file descriptor /color:8ee48ac867numbers 0 (standard input), 1 (standard output), and 2 (standard error) toge

11、ther with the redirection metacharacters to control input and output in the Bourne and Korn shells. Table 16-7 shows the mon ways you can redirect file descriptors. i:8ee48ac867Table 16-7 Bourne and Korn Shell Redirection /i:8ee48ac867 - Description Command color=red:8ee48ac867Take STDIN from file R

12、edirect STDOUT to file file, or 1file Redirect STDERR to file 2 file Append STDOUT to end of file file Redirect STDERR to STDOUT 2&1 Pipe standard output of cmd1 as standard input to cmd2 cmd1 | cmd2 Use file as both STDIN and STDOUT file Close STDIN &- Close STDERR 2&- /color:8ee48ac867 - When redi

13、recting STDIN and STDOUT in the Bourne and Korn shells, you can omit the file descriptors 0 and 1 from the redirection symbols. You must always use the file descriptor 2 with the redirection symbol. The 0 and 1 file descriptors are implied, and not used explicitly for the C shell, as shown in Table 16-8. The C shell representation for standard error (2) is an ampersand (&). STDERR can only be redirected whe

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号