上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 26 下一页
  2017年2月8日
摘要: tcp连接时的三次握手:客户端connect时发出syn信号给服务端,服务端收到后返回ack信号和syn信号,客户端收到后发送ack信号给服务端。可以用两个人在线语音形象的描述三次握手我对你说:能听到我说话吗(syn)?你听到后跟我说:能听到(ack),那你能听到我说话吗(syn)?我听到后跟你说: 阅读全文
posted @ 2017-02-08 17:19 邶风 阅读(204) 评论(0) 推荐(0) 编辑
  2017年1月23日
摘要: 一步步实现,先看最简单的ls的指令: ls不带参数,直接打印文件名 dst.txt main10.c main11.c main12.c main13.c main14.c~ main15.c~ main1.c main2.c main3.c main4.c main5.c main6.c main 阅读全文
posted @ 2017-01-23 15:27 邶风 阅读(434) 评论(0) 推荐(0) 编辑
  2017年1月22日
摘要: 设置工作目录: #include <unistd.h> int chdir(const char *path); int fchdir(int fd); chdir() changes the current working directory of the calling process to t 阅读全文
posted @ 2017-01-22 15:21 邶风 阅读(1099) 评论(0) 推荐(0) 编辑
摘要: #include <sys/stat.h> #include <sys/types.h> int mkdir(const char *pathname, mode_t mode); 创建一个新的空目录,空目录中会自动创建 . 和.. 目录 所创建的目录的存取权限由 mode&~umask 指定 #i 阅读全文
posted @ 2017-01-22 14:17 邶风 阅读(306) 评论(0) 推荐(0) 编辑
摘要: int rename(const char *oldpath, const char *newpath); rename() renames a file, moving it between directories if required. 利用rename实现简单的mv指令 文件的删除可以使用u 阅读全文
posted @ 2017-01-22 14:02 邶风 阅读(2058) 评论(0) 推荐(0) 编辑
摘要: #include <sys/types.h> #include <sys/stat.h> mode_t umask(mode_t mask); 在进程创建一个新的文件或目录时,如调用open函数创建一个新文件,新文件的实际存取权限是mode与umask按照 mode&~umask运算以后的结果。um 阅读全文
posted @ 2017-01-22 10:29 邶风 阅读(2459) 评论(0) 推荐(0) 编辑
  2017年1月20日
摘要: #include <sys/types.h> #include <utime.h> int utime(const char *filename, const struct utimbuf *times); #include <sys/time.h> int utimes(const char *f 阅读全文
posted @ 2017-01-20 17:16 邶风 阅读(717) 评论(0) 推荐(0) 编辑
摘要: 转载:http://blog.csdn.net/a_ran/article/details/43562429 int truncate(const char *path, off_t length); int ftruncate(int fd, off_t length); 将文件大小改变为参数le 阅读全文
posted @ 2017-01-20 16:51 邶风 阅读(9511) 评论(0) 推荐(0) 编辑
摘要: 转载:http://www.eefocus.com/ayayayaya/blog/10-07/193194_0d80b.html 在我们学习IO的时候,曾经利用文件IO函数,标准IO函数都实现了对文件的拷贝,那么在我们学习过进程间通信后,就可以创建多个进程来完成对同一个文件的读写。例如让父进程写文件 阅读全文
posted @ 2017-01-20 16:06 邶风 阅读(7134) 评论(0) 推荐(0) 编辑
  2017年1月19日
摘要: 转自http://www.cnblogs.com/xuyh/p/3273082.html 用命令F_GETFL和F_SETFL设置文件标志,比如阻塞与非阻塞 F_SETFL 设置给arg描述符状态标志,可以更改的几个标志是:O_APPEND, O_NONBLOCK,O_SYNC和O_ASYNC。 命 阅读全文
posted @ 2017-01-19 13:51 邶风 阅读(15587) 评论(0) 推荐(1) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 26 下一页