From faf80b8f3a0016a3bc57a9c7e8bd64cb606575ba Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 23 Aug 2018 18:13:05 +0100 Subject: [PATCH] dirname: add page (#2251) --- pages/linux/dirname.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/linux/dirname.md diff --git a/pages/linux/dirname.md b/pages/linux/dirname.md new file mode 100644 index 0000000000..7aaa75fd61 --- /dev/null +++ b/pages/linux/dirname.md @@ -0,0 +1,15 @@ +# dirname + +> Calculates the parent directory of a given file or directory path. + +- Calculate the parent directory of a given path: + +`dirname {{path/to/file_or_directory}}` + +- Calculate the parent directory of multiple paths: + +`dirname {{path/to/file_a}} {{path/to/directory_b}}` + +- Delimit output with a NUL character instead of a newline (useful when combining with `xargs`): + +`dirname --zero {{path/to/directory_a}} {{path/to/file_b}}`