Mac OSX下的tree命令
2017-05-23 18:27
309 查看
0.本文目录
本文目录开篇明志
曲线救国-解决方案
1.开篇明志
想生成当前文件夹的树状结构,然而,mac下默认是没有tree命令
-bash: tree: command not found
2.曲线救国-解决方案
修改~/.bash_profile配置文件
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
通过brew命令安装tree组件
brew install tree
iMac:springredis anthony$ brew install tree Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (caskroom/cask). ==> Downloading https://homebrew.bintray.com/bottles/tree-1.7.0.sierra.bottle.1.tar.gz ######################################################################## 100.0% ==> Pouring tree-1.7.0.sierra.bottle.1.tar.gz /usr/local/Cellar/tree/1.7.0: 7 files, 113.3KB
进入
~/software目录下,执行
tree命令, 生成下面树状结构:
iMac:software anthony$ tree . ├── GitHub\ Desktop\ 222.zip ├── MacWW_7_6_10-7.08.00-8659.dmg ├── Python │ └── Anaconda3-4.3.1-MacOSX-x86_64.sh ├── Redis │ ├── redis-3.0.0.tar.gz │ └── redis-desktop-manager-0.8.3-2550.dmg ├── apache-maven-3.5.0-bin.tar.gz ├── apache-tomcat-8.0.22.zip ├── cn_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677816.iso ├── license.dash-license ├── mysql-5.7.13-osx10.11-x86_64.dmg ├── mysql-workbench-community-6.3.3-osx-x86_64.dmg ├── qt-opensource-mac-x64-clang-5.6.2.dmg ├── sogou_mac_32c.dmg ├── weka-3-8-0-oracle-jvm.dmg └── xmind-8-mac-wm.dmg 2 directories, 15 files
相关文章推荐
- mac OS X下终端使用tree命令列目录
- mac OS X下终端使用tree命令列目录
- MacOSX的tree命令
- MAC OS X终端常用命令
- mac os x 命令+10个常用命令行工具
- Mac OS X: airport命令的参数
- Mac OS X:显示分辨率的命令(源程序)
- [Mac/Win] 查看历史命令(Display a full command prompt history for Mac and Windows OS)
- 40 个实用的 Mac OS X Shell 脚本和终端命令
- MAC OS X 终端命令入门 (简单常用整理)
- 使用Mac OS X系统必须了解的10条命令
- MAC OS X 终端命令入门 (简单常用整理)
- Mac OS X:远程执行osascript命令
- MAC OS X终端常用命令
- Mac OS X 命令行窗口使用 rar / unrar 命令
- MacOS X 命令查看CPU信息
- Mac OS X 10.5.8下的MySQL 5.0.77动物园数据库教程练习命令
- [转]使用Mac OS X系统必须了解的10条命令
- Mac OS X:显示/设置分辨率的命令(源程序)
- Mac OS X 10.5.8下的MySQL 5.0.77动物园数据库教程练习命令