DIRNAME(1)                BSD General Commands Manual               DIRNAME(1)

NAME
     dirname -- return directory portion of pathname

SYNOPSIS
     dirname pathname

DESCRIPTION
     dirname deletes the filename portion, beginning with the last slash ('/')
     character to the end of pathname, and writes the result to the standard
     output.

EXIT STATUS
     The dirname utility exits 0 on success, and >0 if an error occurs.

EXAMPLES

     1> dirname c/list
     c

     1> dirname sys:c/list
     sys:c

     1> dirname sys:
     sys:

     1> dirname list
     "" 

SEE ALSO
     basename

BSD                             August 10, 2012                            BSD
