Technology weblog

IT-Essence
Thursday Jan 17, 2008

Tree

If you need to list the contents of your directories in such a way that they can seemlessly be incorporated into a presentation, the tree command is probably what you are looking for. After setting up a Maven archetype project, the tree command was used to generate the followiing output:

bash[572]% tree -F demo-app/
demo-app/
|-- pom.xml
`-- src/
|-- main/
| `-- java/
| `-- demo/
| `-- App.java
`-- test/
`-- java/
`-- demo/
`-- AppTest.java

7 directories, 3 files

What cannot be seen here is that even directory colors are seen, just like listing with ls.

Gentoo Linux users can easily obtain this tool using:

emerge -av app-text/tree

Comments:

Post a Comment:
Comments are closed for this entry.

Hire us
Archives
Tags
Links
Stats
Referrers