Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Mac 终端文件目录树状(tree)显示 #72

@qingquan-li

Description

@qingquan-li

文件目录树状(tree)显示

tree

安装 tree

使用 brew 安装

brew install tree

使用

  • 直接使用 tree 命令,会在当前文件目录下,递归输出所有文件层级
    $ tree
  • 限制层级
    $ tree -L 2
  • 指定当前目录下的某个文件夹
    $ tree Desktop

导出文件

> 文件名.格式 的形式导出

$ tree -L 1 > tree.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions