Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ basename(3G) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dirname(3G)

basename(1)



basename(3G)                     UNIX System V                     basename(3G)


NAME
      basename - return the last element of a path name

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

      #include <libgen.h>

      char *basename (char *path);

DESCRIPTION
      Given a pointer to a null-terminated character string that contains a
      path name, 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
                            Input string   Output pointer
                            _____________________________
                            /usr/lib       lib
                            /usr/          usr
                            /              /

SEE ALSO
      dirname(3G).
      basename(1) in the User's Reference Manual.



























10/89                                                                    Page 1





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