Files
oldlinux-files/Linux-0.98/Yggdrasil-0.98.3/usr/man/man2/chdir.2
2024-02-19 00:21:16 -05:00

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.