tree的编译安装练习

#1 安装相关的依赖包
[root@centos7 ~]#yum install gcc make
#2 下载源码并解压
[root@centos7 ~]#cd /usr/local/src
[root@centos7 src]#tar xvf tree-1.8.0.tgz
#3 进入解压缩的目录,README和INSTALL
[root@centos7 tree-1.8.0]#cd tree-1.8.0/
[root@centos7 tree-1.8.0]#cat README
[root@centos7 tree-1.8.0]#cat INSTALL
#4 修改源码的版本号
[root@centos7 tree-1.8.0]#grep -R ‘v1.8.0’ *
tree.c:static char *version ="$Version: $ tree v1.8.0 © 1996 - 2018 by Steve
Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro KaTeX parse error: Undefined control sequence: \t at position 34: …har *hversion="\̲t̲\t tree v1.8.0 …Version: $ tree v2.88.99 © 1996 - 2018 by Steve Baker,
Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro KaTeX parse error: Undefined control sequence: \t at position 27: …har *hversion="\̲t̲\t tree v2.88.9…PATH:/apps/tree/bin’ > /etc/profile.d/tree.sh
[root@centos7 ~]#. /etc/profile.d/tree.sh
[root@centos7 ~]#echo KaTeX parse error: Expected 'EOF', got '#' at position 121: …root@centos7 ~]#̲tree --version …PATH’ > /etc/profile.d/tree.sh
[root@centos7 ~]#. /etc/profile.d/tree.sh
[root@centos7 ~]#exit
[root@centos7 ~]#echo $PATH
/apps/tree/bin:/usr/lib64/qt-
3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
#10 验证结果
[root@centos7 ~]#tree --version
tree v2.88.99 © 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher,
Florian Sesser, Kyosuke Tokoro
[root@centos7 ~]#tree -J
[{“type”:“directory”,“name”: “.”,“contents”:[
{“type”:“file”,“name”:“anaconda-ks.cfg”},
范例:编译安装cmatrix
{“type”:“file”,“name”:“initial-setup-ks.cfg”}
]},
{“type”:“report”,“directories”:0,“files”:2}
]
[root@centos7 ~]#tree -X

<?xml version="1.0" encoding="UTF-8"?> 0 2
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值