CMD tree command limit number of levels

前端 未结 6 912
盖世英雄少女心
盖世英雄少女心 2021-02-07 04:18

How do I limit the number of levels that the tree command goes through in Windows? I need to output the results to a text file for work, but because by default the tree command

6条回答
  •  甜味超标
    2021-02-07 05:08

    If you use WSL you can also export the result straight to the Windows clipboard

    • From the WSL Cline, if you don't already have tree installed: sudo apt install tree
    • Then: tree -L 5 | clip.exe (replace 5 with however many levels deep you want)

    That'll bypass saving it to a txt file and go straight to your clipboard for quick pasting into forums, etc.

提交回复
热议问题