摘要: 获取当前目录 • linux命令中可以使用pwd查看当前目录,系统编程中可以通过getcwd获取当前目录• man 3 getcwd• char *getcwd(char *buf, size_t size);– 参数*buf:保存当前目录的缓冲区– 参数size:在现代linux 中,buf 的长 阅读全文
posted @ 2018-08-01 16:39 习惯就好233 阅读(376) 评论(0) 推荐(0) 编辑
摘要: chmod权限 使用命令"man 2 chmod"学习chmod函数• int chmod(const char *path, mode_t mode);– 参数*path:文件路径。– 参数mode:直接使用数字即可。和前面命令中chmod 777 xxx 中的777 这个参数含义类似,也可以使用 阅读全文
posted @ 2018-08-01 15:30 习惯就好233 阅读(154) 评论(0) 推荐(0) 编辑