View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Dirname

From LQWiki

Jump to: navigation, search

dirname returns the directory portion of a path.

For example:

$ dirname "foo/bar/baz"
foo/bar

dirname is the opposite of basename.


Share

Personal tools