《Linux函数调用手册》之___chdir改变当前的工作目录
定义:
int chdir(const char * path);
表头文件:
#include<unistd.h>
说明:
chdir()用来将当前的工作目录改变成以参数path所指的目录。
返回值:
执行成功则返回0, 失败返回-1, errno为错误代码。
相关函数:
getcwd, chroot
示例:
执行:
current working directory :/tmp>
返回顶部 | 《Linux函数调用大全》 | 《Linux命令大全》 | Linux专栏