29 lines
609 B
Groff
29 lines
609 B
Groff
.TH CHDIR 2
|
|
.UC 4
|
|
.SH NAME
|
|
chdir \- change working directory
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.B #include <unistd.h>
|
|
.B int chdir (const char path);
|
|
.fi
|
|
.SH DESCRIPTION
|
|
.B chdir()
|
|
changes the current directory to that specified in
|
|
.I path.
|
|
0 is returned on success, a negative value on error.
|
|
.SH ERRORS
|
|
.B -ENOTDIR
|
|
is returned if
|
|
.I path
|
|
is not a directory.
|
|
.PP
|
|
.B -ENOENT
|
|
is returned if there is not an inode for
|
|
.I path.
|
|
.SH FILES
|
|
linux/fs/open.c, /usr/include/linux/sys.h, /usr/include/unistd.h
|
|
.SH BUGS
|
|
Linux will incorrectly allow you to change into a directory
|
|
for which you have no execute permissions.
|