Linux和Mac系統下,可以通過tree
命令來生成目錄結構,生成的結構如下:
.
├── LICENSE
├── README.md
├── hello-springboot-starter
│ ├── hello-springboot-starter.iml
│ ├── pom.xml
│ └── target
│ ├── hello-springboot-starter-1.0-SNAPSHOT.jar
│ └── maven-archiver
│ └── pom.properties
├── hello-springboot-starter-autoconfigure
│ ├── hello-springboot-starter-autoconfigure.iml
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ │ └── com
│ │ └── example
│ │ └── starter
│ │ ├── HelloProperties.java
│ │ ├── HelloService.java
│ │ └── HelloServiceAutoconfiguration.java
│ └── resources
│ └── META-INF
│ └── spring.factories
└── hello-springboot-starter-test
├── hello-springboot-starter-test.iml
├── pom.xml
└── src
└── main
├── java
│ └── com
│ └── example
│ └── starter
│ ├── HelloController.java
│ └── HelloSpringbootStarterTestApplication.java
└── resources
└── application.properties
Mac系統可以通過 brew install tree
來安裝tree命令。 使用tree --help
可以查看所有可用的命令,常用的幾個命令如下:
- -a 顯示所有文件和目錄。
- -A 使用ASNI繪圖字符顯示樹狀圖而非以ASCII字符組合。
- -C 在文件和目錄清單加上色彩,便於區分各種類型。
- -d 顯示目錄名稱而非內容。
- -D 列出文件或目錄的更改時間。
- -f 在每個文件或目錄之前,顯示完整的相對路徑名稱。
- -F 在執行文件,目錄,Socket,符號連接,管道名稱名稱,各自加上"*","/","=","@","|"號。
- -g 列出文件或目錄的所屬羣組名稱,沒有對應的名稱時,則顯示羣組識別碼。
- -i 不以階梯狀列出文件或目錄名稱。
- -L level 限制目錄顯示層級。
- -l 如遇到性質爲符號連接的目錄,直接列出該連接所指向的原始目錄。
- -n 不在文件和目錄清單加上色彩。
- -N 直接列出文件和目錄名稱,包括控制字符。
- -p 列出權限標示。
- -P<範本樣式> 只顯示符合範本樣式的文件或目錄名稱。
- -q 用"?"號取代控制字符,列出文件和目錄名稱。
- -s 列出文件或目錄大小。
- -t 用文件和目錄的更改時間排序。
- -u 列出文件或目錄的擁有者名稱,沒有對應的名稱時,則顯示用戶識別碼。
- -x 將範圍侷限在現行的文件系統中,若指定目錄下的某些子目錄,其存放於另一個文件系統上,則將該子目錄予以排除在尋找範圍外