2015年3月10日
摘要: int stat(const char *path, struct stat *buf);int fstat(int fd, struct stat *buf);唯一不同是参数不同,其他一样。文件的一些属性参数:struct stat{ dev_t st_dev; /* ID of device... 阅读全文
posted @ 2015-03-10 17:29 后进后退 阅读(825) 评论(0) 推荐(0) 编辑
摘要: int main1(int argc ,char *argv[]){ if(argc 0)//文件大的时候由于buf太小每次只读buf大小, sizeof(buf)-1表示每次不把buff读满留一个作为结尾防止最后一个字节乱码 { printf("... 阅读全文
posted @ 2015-03-10 17:10 后进后退 阅读(339) 评论(0) 推荐(0) 编辑