Peter 时光机

追求卓越,成功便会不期而至。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年5月1日

摘要: 这些天学习《UNIX环境高级编程》,里面提及到一种空洞文件,即文件中间有大量空洞,'\0'的字符填充。生成的代码如下#include <fcntl.h>#include <apue.h>int main(){ int fd; if((fd = creat("file.hole",FILE_MODE))<0) printf("Wrong!"); write(fd,"file hole\n",9); lseek(fd,1234,SEEK_SET); write(fd,"hello,w 阅读全文
posted @ 2012-05-01 15:39 Peter 时光机 阅读(806) 评论(1) 推荐(1) 编辑