在Windows中使用Linux版本的tree指令生成目录结构树

(1)Git 下载地址:Git - Downloading Package (git-scm.com)
(2)Tree for Windows 下载地址:Tree for Windows (sourceforge.net)
(3)在 Tree for Windows 的下载页面中,选择 Binaries 版本。解压下载的压缩包,将 bin 目录下的 tree.exe 文件放在 Git 目录下。位置参考:
C:\software\Git\usr\bin
(4) 随便找一个项目,进入该项目的根目录,右键 Git Bash here,输入以下指令生成当前项目的目录结构树。
tree -I "node_modules"

结果:

.
|-- index.html
|-- package.json
|-- public
|   `-- vite.svg
|-- src
|   |-- App.css
|   |-- App.jsx
|   |-- assets
|   |   `-- react.svg
|   |-- index.css
|   `-- main.jsx
`-- vite.config.js

 

posted @ 2023-04-07 09:18  一鹿顺风117  阅读(74)  评论(0编辑  收藏  举报