在 Mac 下可以透過 HomeBrew 安裝 tree 命令。

brew install tree

1.png

可能會得到像上面這樣的錯誤,這時調用指示的命令。

2.png

再次嘗試安裝即可。

3.png

安裝完就可以正常使用 tree 命令了。

4.png