dirname
Dirname is a Unix program and part of the POSIX standard. There is a file path the directory. The opposite of dirname is the base name.
Application Examples
$ Dirname / home / alice / image.jpg / home / alice $ Dirname / home / alice / / home see also