dirname Command Examples

Calculates the parent directory of a file or directory path. More information: https://www.gnu.org/software/coreutils/manual/html_node/dirname-invocation.html.

dirname {{path/to/file_or_directory}}

dirname {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}

dirname --zero {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}