X Tutup
Skip to content

Commit 2670072

Browse files
committed
add post
1 parent 2fe1211 commit 2670072

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
layout: post
3+
title: 文件目录树状(tree)显示
4+
subtitle: Mac终端显示输树状文件结构
5+
date: 2017-03-07
6+
author: BY
7+
header-img: img/post-bg-debug.png
8+
catalog: true
9+
tags:
10+
- Mac
11+
- 效率
12+
- 开发技巧
13+
---
14+
15+
> 使用 **tree** 在终端显示树状文件结构
16+
17+
![](https://ww4.sinaimg.cn/large/006tKfTcgy1fdhotefcb5j315s0ugjwk.jpg)
18+
19+
#### 安装 tree
20+
使用 **brew** 进行安装
21+
22+
$ brew install tree
23+
24+
#### 使用
25+
- 直接使用 `tree` 命令,会在当前文件目录下,递归输出所有文件层级
26+
27+
$ tree
28+
29+
- 限制层级
30+
31+
$ tree -L 2
32+
33+
- 指定当前目录下的某个文件夹
34+
35+
$ tree Desktop
36+
37+
#### 导出文件
38+
`> 文件名.格式` 的形式导出
39+
40+
$ tree -L 1 > tree.md

0 commit comments

Comments
 (0)
X Tutup