001、
[root@pc1 test2]# ls [root@pc1 test2]# basename /home/test2/a.txt ## 仅仅获取文件 a.txt [root@pc1 test2]# dirname /home/test2/a.txt ## 仅仅获取路径 /home/test2
。
001、
[root@pc1 test2]# ls [root@pc1 test2]# basename /home/test2/a.txt ## 仅仅获取文件 a.txt [root@pc1 test2]# dirname /home/test2/a.txt ## 仅仅获取路径 /home/test2
。