#navi(../)
* ディレクトリをツリー構造で表示する・tree [#cd70c059]
treeコマンドを利用するとディレクトリをツリー構造で表示することができます。~
以下にtreeコマンドの使用例を記します。
#contents
#htmlinsertpcsp(win-top.html,win-sp.html)
* 関連記事 [#ta5c25b6]
[[linux.just4fun.bizの記事>http://linux.just4fun.biz/]]
-[[逆引きUNIXコマンド/ディレクトリ・ファイルをツリー構造で表示する・tree>http://linux.just4fun.biz/%E9%80%86%E5%BC%95%E3%81%8DUNIX%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%83%BB%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E3%83%84%E3%83%AA%E3%83%BC%E6%A7%8B%E9%80%A0%E3%81%A7%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B%E3%83%BBtree.html]]
* treeコマンド [#od6aeeaf]
treeコマンドの使用例をいくつか紹介します。
** treeコマンド・オプションなし [#ecec97b3]
オプションなしの場合、ディレクトリのみ表示されます。
C:\Users\sakura>tree
フォルダー パスの一覧
ボリューム シリアル番号は 00000200 981D:1023 です
C:.
├─Contacts
├─Desktop
├─Documents
├─Downloads
├─Favorites
│ ├─Links
│ └─Links for 日本
├─Links
├─Music
├─Pictures
├─Saved Games
├─Searches
└─Videos
** tree /f オプションで実行 [#wf86d087]
''F''オプションを使用するとディレクトリとファイル名が表示されます。
C:\Users\sakura>tree /f
フォルダー パスの一覧
ボリューム シリアル番号は 00000200 981D:1023 です
C:.
├─Contacts
│ sakura.contact
│
├─Desktop
├─Documents
├─Downloads
├─Favorites
│ ├─Links
│ │ Web スライス ギャラリー.url
│ │ おすすめサイト.url
│ │
│ └─Links for 日本
│ マイクロソフトによるセキュリティ情報.url
│
├─Links
│ Desktop.lnk
│ Downloads.lnk
│ RecentPlaces.lnk
│
├─Music
├─Pictures
├─Saved Games
├─Searches
└─Videos
** tree /a オプションで実行 [#ye193b47]
''A''オプションを利用すると経線が¥, +, -, | で表現されるようになります。
C:\Users\sakura>tree /a
フォルダー パスの一覧
ボリューム シリアル番号は 00000200 981D:1023 です
C:.
+---Contacts
+---Desktop
+---Documents
+---Downloads
+---Favorites
| +---Links
| \---Links for 日本
+---Links
+---Music
+---Pictures
+---Saved Games
+---Searches
\---Video
#htmlinsertpcsp(win-btm.html,win-sp.html)