查看base那么命令的帮助:
[email protected]:/# basename --help
BusyBox v1.22.1 (2015-09-15 16:38:30 CST) multi-call binary.
Usage: basename FILE [SUFFIX] 这个是basename的用法
Strip directory path and .SUFFIX from FILE 出去路径(和后缀名),只显示文件名
例如:
[email protected]:/# basename /tmp/hbg/test.jpg
test.jpg
[email protected]:/# basename /tmp/hbg/test.jpg .jpg
test
[email protected]:/# basename /tmp/hbg/test.jpg jpg
test.
[email protected]:/#
时间: 2025-01-01 03:32:53