首页 > 系统服务 > 详细

linux命令---basename,dirname

时间:2018-08-25 21:14:17      阅读:176      评论:0      收藏:0      [点我收藏+]
basename:strip directory and suffix from filenames。打印路径中的文件名
diename:strip non-directory suffix from file name。打印路径中的路径(除去文件名)
实例:

[root@www tmp]# basename /root/test.txt
test.txt
[root@www tmp]# dirname /root/test.txt
/root
[root@www tmp]#

linux命令---basename,dirname

原文:http://blog.51cto.com/12107790/2164369

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!