Linux命令以樹的形式列印目錄結構 - Linux command to print directory structure in the form of a tree

語言: CN / TW / HK

問題:

Is there any linux command that I can call from a Bash script that will print the directory structure in the form of a tree, eg,我可以從Bash指令碼中呼叫任何Linux命令嗎,它將以樹的形式列印目錄結構,例如,

folder1
   a.txt
   b.txt
folder2
   folder3

解決方案:

參考一: https://stackoom.com/question/EUxt
參考二: Linux command to print directory structure in the form of a tree
「其他文章」