摘要: 1 文件截短有时我们需要把文件尾端处截去一些数据以缩短文件,将一个文件清0是一个特例。在打开文件时使用O_TRUNC标志可以做到这一点。#include int truncate(const char *pathname,off_t length);int ftruncate(int filedes... 阅读全文
posted @ 2014-11-19 20:27 avengervirus 阅读(172) 评论(0) 推荐(0)