*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> pathfind (3g)              
Title
Content
Arch
Section
 

Contents


pathfind(3G)							  pathfind(3G)


NAME    [Toc]    [Back]

     pathfind -	search for named file in named directories

SYNOPSIS    [Toc]    [Back]

     cc	[flag ...] file	...  -lgen [library ...]

     #include <libgen.h>

     char *pathfind (const char	*path<b>, const char *name<b>, const char
	 *mode<b>);

DESCRIPTION    [Toc]    [Back]

     pathfind searches the directories named in	path for the file name.	 The
     directories named in path are separated by	colons.	 mode is a string of
     option letters chosen from	the set	rwxfbcdpugks:
			    Letter   Meaning
			    __________________________
			      r	     readable
			      w	     writable
			      x	     executable
			      f	     normal file
			      b	     block special
			      c	     character special
			      d	     directory
			      p	     FIFO (pipe)
			      u	     set user ID bit
			      g	     set group ID bit
			      k	     sticky bit
			      s	     size nonzero
     Options read, write, and execute are checked relative to the real (not
     the effective) user ID and	group ID of the	current	process.

     If	the file name, with all	the characteristics specified by mode, is
     found in any of the directories specified by path,	then pathfind returns
     a pointer to a string containing the member of path, followed by a	slash
     character (/), followed by	name.

     If	name begins with a slash, it is	treated	as an absolute path name, and
     path is ignored.

     An	empty path member is treated as	the current directory.	rather,	the
     unadorned name is returned.

EXAMPLES    [Toc]    [Back]

     To	find the ls command using the PATH environment variable:

	  pathfind (getenv ("PATH"), "ls", "rx")

SEE ALSO    [Toc]    [Back]

      
      
     sh(1), test(1), access(2),	mknod(2), stat(2), getenv(3C)





									Page 1






pathfind(3G)							  pathfind(3G)


DIAGNOSTICS    [Toc]    [Back]

     If	no match is found, pathname returns a null pointer, ((char *) 0).

NOTES    [Toc]    [Back]

     The string	pointed	to by the returned pointer is stored in	a static area
     that is reused on subsequent calls	to pathfind.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
named.conf Tru64 named configuration file
named.boot Tru64 named configuration file
named.conf FreeBSD configuration file for named(8)
cvcat IRIX Copy standard in to named file
fifo Linux first-in first-out special file, named pipe
tt_file_objects_query HP-UX find all objects in the named file
pxfaccess IRIX Checks the accessibility of a named file
MrmFetchColorLiteral Tru64 Fetches a named color literal from a UID file
MrmFetchColorLiteral HP-UX Fetches a named color literal from a UID file
MrmFetchColorLiteral IRIX Fetches a named color literal from a UID file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service