摘要: char *path = getenv("HOME");printf("path = %s\n",path);getenv是标准库函数,包含stdlib.h头文件就可. 阅读全文
posted @ 2014-07-21 17:03 步天有术 阅读(948) 评论(0) 推荐(0) 编辑
摘要: linuxC之access函数access():判断是否具有存取文件的权限相关函数stat,open,chmod,chown,setuid,setgid表头文件#include定义函数int access(const char * pathname, int mode);函数说明access()会检... 阅读全文
posted @ 2014-07-21 17:02 步天有术 阅读(1485) 评论(0) 推荐(0) 编辑
摘要: linux下文件的读写操作(openreadwrite)转http://www.2cto.com/os/201403/285837.htmlopen(打开文件)相关函数 read,write,fcntl,close,link,stat,umask,unlink,fopen表头文件 #include#... 阅读全文
posted @ 2014-07-21 10:45 步天有术 阅读(7415) 评论(0) 推荐(0) 编辑