08 2012 档案

摘要:[本篇全文] [本篇作者: OP07] [本篇人气: 19]0发信人: OP07 (【EE07】打雷『齊魯』), 信区: LinuxUnix标 题: [合集]问一下fork()多进程发信站: 南京大学小百合站 (Tue Aug 14 11:17:01 2012)asic (阿塞克) 于Mon Jul 16 12:48:46 2012)提到:int main() {printf("hello ");fork();printf("world\n");}执行结果是打印了两行 hello world和我之前所理解的不一样,我理解的是父进程执行到fork()函数才 阅读全文
posted @ 2012-08-24 09:02 goooooooooo 阅读(347) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/hguisu/article/details/7453390http://www.cppblog.com/tx7do/archive/2010/06/11/117609.html 阅读全文
posted @ 2012-08-22 20:29 goooooooooo 阅读(117) 评论(0) 推荐(0) 编辑
摘要:http://blog.sina.com.cn/s/blog_50571b1f010082pg.htmlint socket(int domain, int type,int protocol)domain:说明我们网络程序所在的主机采用的通讯协族(AF_UNIX和AF_INET等). AF_UNIX只能够用于单一的Unix系统进程间通信,而AF_INET是针对Internet的,因而可以允许在远程主机之间通信type:我们网络程序所采用的通讯协议(SOCK_STREAM,SOCK_DGRAM等) SOCK_STREAM表明我们用的是TCP协议,这样会提供按顺序的,可靠,双向,面向连接的比特流 阅读全文
posted @ 2012-08-22 20:18 goooooooooo 阅读(141) 评论(0) 推荐(0) 编辑
摘要:http://chenxie.blog.hexun.com/33871379_d.htmlfor file in $(find . -name "*.del" -type f);do mv "$file" "${file%.del}";donefile=/dir1/dir2/dir3/my.file.txt我们可以用 ${ } 分别替换获得不同的值:${file#*/}:拿掉第一条 / 及其左边的字符串:dir1/dir2/dir3/my.file.txt${file##*/}:拿掉最后一条 / 及其左边的字符串:my.file.tx 阅读全文
posted @ 2012-08-10 12:08 goooooooooo 阅读(188) 评论(0) 推荐(0) 编辑