
Linux
iteye_20458
这个作者很懒,什么都没留下…
展开
-
Linux重定向
一:基础知识。1:linux下的所有操作都是与文件相关的(stdout/stderr/stdcin都是特殊的文件),所以I/O重定向是与FD紧密相关的。2:shell的FD为10个(0 - 9),常用FD有:0(stdcin),1(stdcout),2(stderr)。3::指定output。4:默认值是1,因此< 与 0与 1>是等价的。5:n>&m:重定向FD n到FD m...原创 2008-09-07 23:04:05 · 129 阅读 · 0 评论 -
Linux常用命令
各种options使用--help进行查看。1:head输出文件的开始n行/n字节等。2:tail输出文件的末尾n行/n字节等。3:cat(concatenate)输出文件到标准输出。4:grep(global search regular expression and print out the line)在文件中或标准输入(当然实际上也是一个文件...原创 2008-09-08 00:30:49 · 124 阅读 · 0 评论 -
{ } 与 ( )
1:use {} to group commands together. eg.$ pwd; ls; cd ../elsewhere; pwd; ls > /tmp/all.outThe final redirect applies only to the last command, the last ls on the line.$ {pwd; ls; cd ../elsewhere...原创 2008-09-09 00:17:13 · 110 阅读 · 0 评论