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

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

Contents


basename(3G)							  basename(3G)


NAME    [Toc]    [Back]

     basename -	return the last	element	of a pathname

SYNOPSIS    [Toc]    [Back]

     cc	[flag <b>...] file	... -lgen [library <b>...]

     #include <libgen.h>
     char *basename (char *path);

DESCRIPTION    [Toc]    [Back]

     Given a pointer to	a null-terminated character string that	contains a
     pathname, basename	returns	a pointer to the last element of path.
     Trailing ``/'' characters are deleted.

     If	path or	*path is zero, pointer to a static constant ``.'' is returned.

EXAMPLES    [Toc]    [Back]

     Input string   Output pointer
     _____________________________
     /usr/lib	    lib
     /usr/	    usr
     /		    /

SEE ALSO    [Toc]    [Back]

      
      
     basename(1), dirname(3G)


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
basename NetBSD return the last component of a pathname
dirname OpenBSD return directory portion of pathname
basename OpenBSD return filename portion of pathname
realpath Linux return the canonicalized absolute pathname
glcgetlistc IRIX return element from list
glcgetlisti IRIX return element from list
basename FreeBSD return filename or directory portion of pathname
dirname FreeBSD return filename or directory portion of pathname
dirname Tru64 Return the base filename or directory portion of a pathname
basename Tru64 Return the base filename or directory portion of a pathname
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service