Is there some *nix tool or perl/php library that will let you easily create directory tree visualizations that look like the following?
www
|-- private
|
Have a look at App::Asciio
That oneliner is pretty cool, I'd recommend using the tree util.
bash-3.2$ mkdir -p this/is/some/nested/example
bash-3.2$ mkdir -p this/is/another/super/nested/example
bash-3.2$ mkdir -p this/is/yet/another/example
bash-3.2$ mkdir -p this/is/some/nested/other/example
bash-3.2$ tree this
this
`-- is
|-- another
| `-- super
| `-- nested
| `-- example
|-- some
| `-- nested
| |-- example
| `-- other
| `-- example
`-- yet
`-- another
`-- example
13 directories, 0 files
I realize this question was answered ages ago, but I just found this program called tree which is pretty cool too.
exa with --tree does an excellent job:
exa --tree ~/tmp/public/
<dir>
├── aboutme
│ └── index.html
├── atrecurse
│ └── index.html
├── base.css
├── html5
│ ├── cat-and-mouse
│ └── frantic
│ ├── css
│ │ └── main.css
How about this example from Unix Tree / Linux Tree:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
Cool Python script to do it: http://code.activestate.com/recipes/217212/