GNU coreutils
18 June 2002
manpages-ja
Japanese version of the manual pages (for users)
man-pages-ja
Japanese man (manual) pages from the Japanese Manual Project
coreutils
The basic file, shell and text manipulation utilities of the GNU operating system
coreutils-common
coreutils common optional components
coreutils-doc
Documentation for the GNU Core Utilities
名前
basename - ファイル名からディレクトリと接尾辞を取り除く
書式
basename 名前 [接尾辞]
basename オプション... 名前...
basename オプション... 名前...
説明
パス名からディレクトリ部分を取り除いた名前を表示します。 指定があれば、末尾の接尾辞も取り除きます。
長いオプションで必須となっている引数は短いオプションでも必須です。
-a, --multiple | |
引数を複数をとり、各引数を NAME として扱う | |
-s, --suffix=SUFFIX | |
末尾にある SUFFIX を削除する | |
-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。
著作権
Copyright © 2016 Free Software Foundation, Inc. ライセンス 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.
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)
を使用すると完全なマニュアルを読むことができるはずだ。
basename の完全なマニュアルは Texinfo マニュアルとして整備されている。もし、 info および basename のプログラムが正しくインストールされているならば、コマンド
info basename |