Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chdir(2) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cd(1)

chroot(2)

CHDIR(2)

NAME

chdir − change working directory

SYNOPSIS

int chdir (path)
char ∗path;

DESCRIPTION

Path points to the path name of a directory.  Chdir causes the named directory to become the current working directory, the starting point for path searches for path names not beginning with /. 

ERRORS

Chdir will fail and the current working directory will be unchanged if one or more of the following are true:

[ENOTDIR] A component of the path name is not a directory. 

[ENOENT] The named directory does not exist. 

[EACCES] Search permission is denied for any component of the path name. 

[EFAULT] Path points outside the allocated address space of the process.  The reliable detection of this error will be implementation dependent. 

[ENOENT] Path is null. 

[ENAMETOOLONG]
The length of the specified path name exceeds PATH_MAX bytes, or the length of a component of the path name exceeds NAME_MAX bytes while _POSIX_NO_TRUNC is in effect. 

[ELOOP] Too many symbolic links were encountered in translating the path name. 

RETURN VALUE

Upon successful completion, a value of 0 is returned.  Otherwise, a value of −1 is returned and errno is set to indicate the error. 

AUTHOR

Chdir was developed by AT&T Bell Laboratories and the Hewlett-Packard Company. 

SEE ALSO

cd(1), chroot(2). 

STANDARDS CONFORMANCE

chdir: SVID2, XPG2, XPG3, POSIX.1, FIPS 151-1

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026