001、dirname用于从绝对路径中剥离出路径
002、basename用于从绝对路径中剥离出文件名
测试:
root@DESKTOP-IDT9S0E:~# ls root@DESKTOP-IDT9S0E:~# dirname /home/test2/a.sh ## dirname剥离出路径 /home/test2 root@DESKTOP-IDT9S0E:~# basename /home/test2/a.sh ## basename剥离出文件名 a.sh
标签:test2,basename,IDT9S0E,sh,linux,DESKTOP,dirname From: https://www.cnblogs.com/liujiaxin2018/p/17321979.html