Windows命令行tree命令打印目录树

本文介绍了如何在Windows命令行中使用tree命令来显示目录结构。通过不同参数的使用,可以实现仅显示目录或者同时包含文件的目录树视图。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

tree $DIRNAME打印目录$DIRNAME下的目录树(只打印目录名,不打印文件名)。不加$DIRNAME打印当前路径的目录树。例如在D:\da_kao_la\workspace\Character-Relationship-Visualization目录下执行tree命令:

D:\da_kao_la\workspace\Character-Relationship-Visualization>tree
卷 新加卷 的文件夹 PATH 列表
卷序列号为 7850-415F
D:.
├─.idea
│  └─inspectionProfiles
├─backend
│  └─large_graphs
├─css
├─imgs
├─javascript
├─jsons
└─movie_scripts

/f参数表示打印目录的同时也打印文件,例如在上面的目录下执行tree /f命令:

D:\da_kao_la\workspace\Character-Relationship-Visualization>tree /f
卷 新加卷 的文件夹 PATH 列表
卷序列号为 7850-415F
D:.
│  .gitignore
│  big_graph.html
│  index.html
│  README.md
│  server.sh
│  time_slider.html
│
├─.idea
│  │  Character-Relationship-Visualization.iml
│  │  deployment.xml
│  │  misc.xml
│  │  modules.xml
│  │  vcs.xml
│  │  workspace.xml
│  │
│  └─inspectionProfiles
├─backend
│  │  LPA.py
│  │  parse.py
│  │
│  └─large_graphs
│          gen_large_graphs.py
│          __init__.py
│
├─css
│      album.css
│      bootstrap-grid.css
│      bootstrap-grid.css.map
│      bootstrap-grid.min.css
│      bootstrap-grid.min.css.map
│      bootstrap-reboot.css
│      bootstrap-reboot.css.map
│      bootstrap-reboot.min.css
│      bootstrap-reboot.min.css.map
│      bootstrap.css
│      bootstrap.css.map
│      bootstrap.min.css
│      bootstrap.min.css.map
│      bundling.css
│      d3RangeSlider.css
│      detail.css
│      font-awesome.min.css
│      graph.css
│      Raleway.css
│      tab.css
│
├─imgs
│      Attention.png
│      base.png
│      fig.png
│      large_graph_click_cluster.png
│      large_graph_click_node.png
│      large_graph_clusters.png
│      large_graph_detail.png
│      LPA_clustering.png
│
├─javascript
│      bootstrap.bundle.js
│      bootstrap.js
│      d3.v2.js
│      d3.v4.min.js
│      echarts-wordcloud.js
│      echarts.simple.js
│      forceDirectedGraph.js
│      jquery.min.js
│      timeSliderLayout.js
│      timeSliderLogic.js
│      wordcloud.js
│
├─jsons
│      10tings.json
│      10tings_afterLPA.json
│      10tings_afterLPA_with_dialogs.json
│      10tings_dialogs_scenes_all.json
│      10tings_dialogs_scenes_all_LPA.json
│      10tings_with_dialogs.json
│      large_graph.json
│      miserables.json
│      miserables2.json
│
└─movie_scripts
        10tings.txt
        Fantastic Four.txt
        HARRY-POTTER-AND-THE-ORDER-OF-THE-PHOENIX-2007-by-Michael-Goldenberg.pdf
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值