摘要: INUX下建立临时的方法(函数)有很多, mktemp, tmpfile等等. 今天只推荐最安全最好用的一种: mkstemp.mkstemp(建立唯一临时文件)头文件:#include声明:intmkstemp(char*template)返回值: 成功则返回0,失败则返回-1.说明:建立唯一临时... 阅读全文
posted @ 2015-01-04 14:45 周人假的 阅读(1679) 评论(0) 推荐(0) 编辑
摘要: 查看文件时间戳命令:stat awk.txtFile: `awk.txt'Size: 20 Blocks: 8 IO Block: 4096 regular fileDevice: 801h/2049d Inode: 380730 Links: 1Access: (0644/-rw-r--r--) ... 阅读全文
posted @ 2015-01-04 14:00 周人假的 阅读(1931) 评论(0) 推荐(0) 编辑
摘要: 1 locate 查找内容。查找数据库,updatedb命令更新数据库2 which 命令3 find 路径 -name 查找内容。find命令会磁盘查找,比较耗时。4 grep 查找内容一般为文档内容的grep -nir "fopen" *.cpp 查找*.cpp文件中包含fopen的并显示文件名... 阅读全文
posted @ 2015-01-04 10:20 周人假的 阅读(432) 评论(0) 推荐(0) 编辑