CHDIR(2)

NAME
chdir - change working directory

SYNOPSIS
#include <unistd.h>
int chdir (const char path);

DESCRIPTION
chdir() changes the current directory to that specified in path. 0 is returned on success, a negative value on error.

ERRORS
-ENOTDIR is returned if path is not a directory.

-ENOENT is returned if there is not an inode for path.

FILES
linux/fs/open.c, /usr/include/linux/sys.h, /usr/include/unistd.h

BUGS
Linux will incorrectly allow you to change into a directory for which you have no execute permissions.