001、basename命令可以获取末尾文件名和末尾目录名
(base) [root@PC1 home]# basename test2/a.txt a.txt (base) [root@PC1 home]# basename test2/dir01/ dir01
002、去除文件名后缀
(base) [root@PC1 home]# basename test2/a.txt txt a. (base) [root@PC1 home]# basename test2/a.txt .txt a
标签:test2,basename,PC1,命令,base,linux,home,txt From: https://www.cnblogs.com/liujiaxin2018/p/16718120.html