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
If you use WSL you can also export the result straight to the Windows clipboard
tree
installed: sudo apt install tree
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.