dirname Command Examples

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

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 ...}}