other languages
other sections
DIRNAME(1) | 用戶命令 | DIRNAME(1) |
名稱¶
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 的在線幫助: <../../software/coreutils/>請向 <../../team/zh_CN.html> 報告 dirname 的翻譯錯誤。
版權¶
Copyright © 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <../../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)完整文檔請見:
<../../software/coreutils/dirname>
或者在本地使用: info
'(coreutils) dirname invocation'
跋¶
本頁面中文版由中文 man 手冊頁計劃提供。中文 man 手冊頁計劃:../../man-pages-zh/manpages-zh
2017年10月 | GNU coreutils 8.28 |