mac tree工具安装 总结

来源:互联网 发布:powermill编程好学吗 编辑:程序博客网 时间:2024/05/21 08:52

tree工具的安装主要参照下面的链接

OS X equivalent of the Ubuntu “tree” command

方法有两种:

一、直接源码编译

首先从tree中下载源码,修改Makefile,将下列注释打开

# Uncomment for OS X:                                                                     CC=ccCFLAGS=-O2 -Wall -fomit-frame-pointer -no-cpp-precompLDFLAGS=MANDIR=/usr/share/man/man1OBJS+=strverscmp.o
然后make编译,就能生成tree工具,将tree移到~/bin/下面
$mv tree ~/bin/
在.bash_profile中加入下列代码

export PATH=~/bin:$PATH
tree就可以使用了


二、工具下载

可以使用mac中的管理工具,如下三个

$brew install tree$sudo port install tree$fink install tree


0 0
原创粉丝点击