您的位置:首页 > 其它

mac tree工具安装 总结

2017-05-02 11:58 357 查看
tree工具的安装主要参照下面的链接

OS X equivalent of the Ubuntu “tree” command

方法有两种:

一、直接源码编译

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

# Uncomment for OS X:
CC=cc
CFLAGS=-O2 -Wall -fomit-frame-pointer -no-cpp-precomp
LDFLAGS=
MANDIR=/usr/share/man/man1
OBJS+=strverscmp.o然后make编译,就能生成tree工具,将tree移到~/bin/下面
$mv tree ~/bin/
在.bash_profile中加入下列代码
export PATH=~/bin:$PATHtree就可以使用了

二、工具下载

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

$brew install tree
$sudo port install tree
$fink install tree
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: