getwd man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

getwd(3C)							     getwd(3C)

NAME
       getwd() - get pathname of current working directory

SYNOPSIS
DESCRIPTION
       places  the  absolute  pathname of the current working directory in the
       array pointed to by buf, and returns buf.

       If the length of the pathname  of  the  current	working	 directory  is
       greater than bytes, fails and returns a null pointer.

RETURN VALUE
       Upon  successful completion, returns a pointer to the current directory
       pathname.  Otherwise, it returns NULL with set.

ERRORS
       fails if the following condition is encountered:

	      The length of the specified path name exceeds
				  bytes, or the length of a component  of  the
				  path name exceeds bytes while is in effect.

       may fail if any of the following conditions are encountered:

	      Read or search permission is denied for a component of pathname.

	      buf		  points  outside  the allocated address space
				  of the process.  may not always detect  this
				  error.

EXAMPLES
       #include <stdio.h>
       #include <unistd.h>
       char *cwd;
       char buf[PATH_MAX+1];
		 ...
       if ((cwd = getwd(buf)) == NULL) {
	   perror("getwd");
	   exit(1);
       }
       puts(cwd);

WARNINGS
       For portability, is preferred over this function.

AUTHOR
       was developed by HP and the University of California, Berkeley.

SEE ALSO
       getcwd(3C), thread_safety(5).

STANDARDS CONFORMANCE
								     getwd(3C)
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net