Provided by: manpages-zh_1.6.3.6-1_all bug

名稱

       dirname - 去除檔名的最後一個組成部分

概述

       dirname [選項] 名稱...

描述

       將每個名稱的最後一個非斜線的組成部分與字尾的斜線移除並輸出;如果所給名稱不包含斜線 '/',則
       輸出 '.'(即代表當前目錄)。

       -z, --zero
              使每行輸出以 NUL 字元結束,不新增換行符

       --help 顯示此幫助資訊並退出

       --version
              顯示版本資訊並退出

範例

       dirname /usr/bin/
              -> "/usr"

       dirname dir1/str dir2/str
              -> "dir1" 後接 "dir2"

       dirname stdio.h
              -> "."

作者

       由 David MacKenzie 和 Jim Meyering 編寫。

報告錯誤

       GNU coreutils 的線上幫助: <https://www.gnu.org/software/coreutils/>
       請向 <https://translationproject.org/team/zh_CN.html> 報告翻譯錯誤。

版權

       Copyright © 2020 Free Software Foundation, Inc.  License GPLv3+:  GNU  GPL  version  3  or
       later <https://gnu.org/licenses/gpl.html>.
       This  is free software: you are free to change and redistribute it.  There is NO WARRANTY,
       to the extent permitted by law.

參見

       basename(1), readlink(1)

       完整文件請見: <https://www.gnu.org/software/coreutils/dirname>
       或者在本地使用: info '(coreutils) dirname invocation'

       本頁面中文版由中文 man 手冊頁計劃提供。
       中文 man 手冊頁計劃:https://github.com/man-pages-zh/manpages-zh