Name
dirname
Synopsis
dirname pathname
Prints pathname
, excluding the last level. Useful for stripping the actual filename from a pathname. If there are no slashes (no directory levels) in pathname
, dirname prints . to indicate the current directory. See also
basename
.
Get Mac OS X Tiger in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.