Provided by: manpages-zh_1.6.3.2-1_all 

名稱
basename - 去除文件名中的目錄與後綴
概述
basename 名稱 [後綴]
basename 選項... 名稱...
描述
打印已經移除所有目錄相關信息後的(文件)名稱。若特別指定,則同時移除指定的後綴名。
必選參數對長短選項同時適用。
-a, --multiple
支持多個參數,把每個參數看作一個(文件)名稱來處理。
-s, --suffix=後綴
移除後綴;同時隱含 -a
-z, --zero
使每行輸出以 NUL 字符結束,不添加換行符
--help 顯示此幫助信息並退出
--version
顯示版本信息並退出
範例
basename /usr/bin/sort
-> "sort"
basename include/stdio.h .h
-> "stdio"
basename -s .h include/stdio.h
-> "stdio"
basename -a any/str1 any/str2
-> "str1" 後接 "str2"
作者
由 David MacKenzie 編寫。
報告錯誤
GNU coreutils 的在線幫助: <http://www.gnu.org/software/coreutils/>
請向 <http://translationproject.org/team/zh_CN.html> 報告 basename 的翻譯錯誤。
版權
Copyright © 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
<http://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.
參見
dirname(1), readlink(1)
完整文檔請見: <http://www.gnu.org/software/coreutils/basename>
或者在本地使用: info '(coreutils) basename invocation'
跋
本頁面中文版由中文 man 手冊頁計劃提供。
中文 man 手冊頁計劃:https://github.com/man-pages-zh/manpages-zh
GNU coreutils 8.28 2017年10月 BASENAME(1)